Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
gpu-base-image-build
Commits
eb8e91a7
Commit
eb8e91a7
authored
Oct 22, 2024
by
chenpangpang
Browse files
feat: 解决冲突
parents
df39499f
2102d036
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
README.md
README.md
+1
-2
build_space/Dockerfile.jupyterlab_ubuntu
build_space/Dockerfile.jupyterlab_ubuntu
+9
-3
No files found.
README.md
View file @
eb8e91a7
...
...
@@ -13,7 +13,7 @@
```
bash
cd
build_space
&&
\
./build_ubuntu.sh jupyterlab
\
ju
y
pterlab-pytorch:2.3.1-py3.10-cuda12.1-ubuntu22.04-devel
\
jup
y
terlab-pytorch:2.3.1-py3.10-cuda12.1-ubuntu22.04-devel
\
pytorch/pytorch:2.3.1-cuda12.1-cudnn8-devel
```
-
参数1: ide,不需要改动
...
...
@@ -53,7 +53,6 @@
- TENSORFLOW_VERSION:tensorflow版本
- CONDA_URL:安装conda的url
### 相关链接
- pytorch镜像(**选择devel镜像**):https://hub.docker.com/r/pytorch/pytorch/tags
- nvidia镜像(**选择devel镜像**):https://hub.docker.com/r/nvidia/cuda/tags
...
...
build_space/Dockerfile.jupyterlab_ubuntu
View file @
eb8e91a7
...
...
@@ -78,9 +78,15 @@ RUN pip3 install --upgrade pip ${SOURCES} || pip install --upgrade pip ${SOURCES
&& mv /etc/apt/sources.list.bak /etc/apt/sources.list \
&& mv /etc/apt/sources.list.d.bak /etc/apt/sources.list.d
RUN if [ $BASE_IMAGE_IS_TORCH -eq 0 && -n "$TORCH_VERSION" ];then \
pip3 install torch==$TORCH_VERSION torchvision==$TORCHVISION_VERSION torchaudio==$TORCHAUDIO_VERSION \
--index-url https://download.pytorch.org/whl/cu$(echo "$BASE_IMAGE" | awk -F'[:-]' '{n=split($2,a,"."); print a[1] a[2]}') \
RUN if [ $BASE_IMAGE_IS_TORCH -eq 0 ];then \
cuda_version=$(echo "$BASE_IMAGE" | awk -F'[:-]' '{n=split($2,a,"."); print a[1] a[2]}') \
&& if [ "${TORCH_VERSION%%.*}" -eq 1 ]; then \
pip3 install --no-cache-dir "numpy<2" \
&& pip3 install --no-cache-dir torch==$TORCH_VERSION+cu$cuda_version torchvision==$TORCHVISION_VERSION+cu$cuda_version torchaudio==$TORCHAUDIO_VERSION \
--extra-index-url https://download.pytorch.org/whl/cu$cuda_version;else \
pip3 install --no-cache-dir torch==$TORCH_VERSION torchvision==$TORCHVISION_VERSION torchaudio==$TORCHAUDIO_VERSION \
--index-url https://download.pytorch.org/whl/cu$cuda_version; fi \
&& rm -r /root/.cache/pip; fi
RUN if [ -n "$TORCH_VERSION" ];then \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment