Commit eb8e91a7 authored by chenpangpang's avatar chenpangpang
Browse files

feat: 解决冲突

parents df39499f 2102d036
......@@ -13,7 +13,7 @@
```bash
cd build_space && \
./build_ubuntu.sh jupyterlab \
juypterlab-pytorch:2.3.1-py3.10-cuda12.1-ubuntu22.04-devel \
jupyterlab-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
......
......@@ -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 \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment