-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
0ee0ccb
commit 594443e
Showing
21 changed files
with
115 additions
and
127 deletions.
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
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,5 +1,4 @@ | ||
workspace | ||
build/COPY_ROOT_EXTRA/ | ||
config/authorized_keys | ||
config/rclone | ||
.env |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
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,16 @@ | ||
#!/bin/false | ||
|
||
build_amd_main() { | ||
build_amd_install_torch | ||
build_common_run_tests | ||
} | ||
|
||
build_amd_install_torch() { | ||
"$PYTHON_VENV_PIP" install --no-cache-dir \ | ||
torch==${PYTORCH_VERSION} \ | ||
torchvision \ | ||
torchaudio \ | ||
--extra-index-url=https://download.pytorch.org/whl/rocm${ROCM_VERSION} | ||
} | ||
|
||
build_amd_main "$@" |
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
# Tidy up and keep image small | ||
apt-get clean -y | ||
micromamba clean -ay | ||
|
||
fix-permissions.sh -o container | ||
|
||
|
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,17 @@ | ||
#!/bin/false | ||
|
||
# For logic common to cpu, cuda & rocm | ||
|
||
build_common_main() { | ||
: | ||
} | ||
|
||
build_common_run_tests() { | ||
installed_pytorch_version=$("$PYTHON_VENV_PYTHON" -c "import torch; print(torch.__version__)") | ||
if [[ "$installed_pytorch_version" != "$PYTORCH_VERSION"* ]]; then | ||
echo "Expected PyTorch ${PYTORCH_VERSION} but found ${installed_pytorch_version}\n" | ||
exit 1 | ||
fi | ||
} | ||
|
||
build_common_main "$@" |
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,16 @@ | ||
#!/bin/false | ||
|
||
build_cpu_main() { | ||
build_cpu_install_torch | ||
build_common_run_tests | ||
} | ||
|
||
build_cpu_install_deps() { | ||
"$PYTHON_VENV_PIP" install --no-cache-dir \ | ||
torch==${PYTORCH_VERSION} \ | ||
torchvision \ | ||
torchaudio \ | ||
--extra-index-url=https://download.pytorch.org/whl/cpu | ||
} | ||
|
||
build_cpu_main "$@" |
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
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,27 @@ | ||
#!/bin/false | ||
|
||
build_nvidia_main() { | ||
build_nvidia_install_torch | ||
build_common_run_tests | ||
build_nvidia_run_tests | ||
} | ||
|
||
build_nvidia_install_torch() { | ||
short_cuda_version="cu$(cut -d '.' -f 1,2 <<< "${CUDA_VERSION}" | tr -d '.')" | ||
"$PYTHON_VENV_PIP" install --no-cache-dir \ | ||
nvidia-ml-py3 \ | ||
torch==${PYTORCH_VERSION} \ | ||
torchvision \ | ||
torchaudio \ | ||
--extra-index-url=https://download.pytorch.org/whl/$short_cuda_version | ||
} | ||
|
||
build_nvidia_run_tests() { | ||
installed_pytorch_cuda_version=$("$PYTHON_VENV_PYTHON" -c "import torch; print(torch.version.cuda)") | ||
if [[ "$CUDA_VERSION" != "$installed_pytorch_cuda"* ]]; then | ||
echo "Expected PyTorch CUDA ${CUDA_VERSION} but found ${installed_pytorch_cuda}\n" | ||
exit 1 | ||
fi | ||
} | ||
|
||
build_nvidia_main "$@" |
File renamed without changes.
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,11 @@ | ||
#!/bin/bash | ||
|
||
# Override this file to add extras to your build | ||
|
||
## START | ||
#umask 002 | ||
|
||
|
||
|
||
## END | ||
#fix-permissions.sh -o container |
File renamed without changes.
Empty file.
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
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