forked from thaitc-hust/AI-Engineer-Note
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# AI-Engineer-Howto | ||
|
||
Tất cả những thứ liên quan đến Pytorch & Pytorch-serving | ||
Tất cả những thứ liên quan đến Pytorch & Pytorch-serving | ||
- [Build Pytorch from source](docs/build_from_source.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Pytorch | ||
|
||
## Build pytorch from source (best config for AMD CPU & NVIDIA-GPU) | ||
We will use OpenBLAS instead of MKL & MKLDNN | ||
``` | ||
# Install anaconda (if not) | ||
curl -O https://repo.anaconda.com/archive/Anaconda3-2020.07-Linux-x86_64.sh | ||
bash Anaconda3-2020.07-Linux-x86_64.sh | ||
source ~/anaconda3/bin/activate | ||
# Install dependencies | ||
conda create -n myenv_pytorch_1.9 python=3.8 | ||
conda activate myenv_pytorch_1.9 | ||
conda install astunparse numpy ninja pyyaml setuptools cmake cffi typing_extensions future six requests dataclasses | ||
pip install ninja | ||
# Build | ||
git clone --recursive --branch v1.9.1 https://github.com/pytorch/pytorch.git | ||
cd pytorch | ||
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} | ||
USE_NCCL=ON USE_CUDNN=OFF USE_CUDA=ON USE_MKL=OFF USE_MKLDNN=OFF python setup.py install | ||
``` | ||
## Compatible version | ||
TorchVision: 0.10.1 | ||
OpenCV: 4.6.0 | ||
MMCV: 1.3.3 | ||
MMCV Compiler: GCC 9.4 | ||
MMCV CUDA Compiler: 11.3 | ||
MMDetection: 2.7.0+e78eee5 | ||
|