制作公司网站一般多久能好,营销策略制定,做租房信息网站,网站建设 广告推广开源项目网址#xff1a;https://github.com/FIGRET/figret 该项目在SIGCOMM2024发表#xff0c;用深度学习方法处理流量工程中的突发问题
1. 创建新的 Conda 环境
使用国内镜像源创建环境
conda create -n figret python3.8.0 --override-channels -c https://mirrors.…开源项目网址https://github.com/FIGRET/figret 该项目在SIGCOMM2024发表用深度学习方法处理流量工程中的突发问题
1. 创建新的 Conda 环境
使用国内镜像源创建环境
conda create -n figret python3.8.0 --override-channels -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/2. 激活环境
conda activate figret激活后终端提示符会显示 (figret)表示已进入该环境。 3. 安装 PyTorch 及相关库
(1) 根据 CUDA 版本安装 PyTorch
首先检查服务器的 CUDA 版本
nvcc --version # 查看 CUDA 工具包版本例如 11.8 或 12.1
nvidia-smi # 查看驱动支持的最高 CUDA 版本根据 CUDA 版本选择 PyTorch 安装命令
CUDA 11.8 查看CUDA版本
(figret) antlantl-node11:~$ nvcc --version显示CUDA11.4PyTorch 官方对 CUDA 11.4 的支持截至 1.12.12022年7月
pip install torch1.12.1cu113 torchvision0.13.1cu113 torchaudio0.12.1 \
--extra-index-url https://download.pytorch.org/whl/cu113验证pytorch
(2) 安装 torch-scatter 和 torch-sparse
命令行安装会出现找不到版本的问题这里需要访问以下网址手动安装 https://data.pyg.org/whl/torch-1.12.1%2Bcu113.html
进入whl所在文件夹手动安装
pip install torch_scatter-2.0.9-cp38-cp38-linux_x86_64.whl
pip install torch_sparse-0.6.14-cp38-cp38-linux_x86_64.whl验证是否配置成功
import torch
from torch_scatter import scatter_add
from torch_sparse import SparseTensorprint(scatter_add) # 输出函数地址
print(SparseTensor) # 输出类地址4. 安装其他依赖包
# 进入 FIGRET 项目目录假设 requirements.txt 在项目根目录
cd /path/to/figret_project# 安装依赖包
pip install -r requirements.txt5. 安装 Gurobi 求解器
(1) 下载并安装 Gurobi
下载地址https://www.gurobi.com/downloads/gurobi-software/
# 解压到 /opt需要 sudo 权限
#注意gurobi11.0.3是下载的版本
sudo tar -xvzf gurobi11.0.3_linux64.tar.gz -C /opt# 添加环境变量
echo export GUROBI_HOME/opt/gurobi1102/linux64 ~/.bashrc
echo export PATH${PATH}:${GUROBI_HOME}/bin ~/.bashrc
echo export LD_LIBRARY_PATH${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib ~/.bashrc
source ~/.bashrc注意环境变量是在主环境配置的可以作用于所有环境
(2) 申请学术许可证 访问 Gurobi 学术许可页面注册并获取许可证密钥。 这里如果校园网网址无法被自动解析为校园网需要发邮件申请 申请流程非常快笔者这边仅5分钟就收到了回信 在服务器上运行以下命令激活许可证 cd $GUROBI_HOME/binsudo ./grbgetkey 密钥6. 验证环境
回到figret环境
conda activate figret运行开源项目
python3 figret.py --topo_name Facebook_pod_a --epochs 3 --batch_size 32 --alpha 0.03运行正常