Skip to content

Commit ed839ca

Browse files
committed
fix python version
1 parent bcd830a commit ed839ca

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/docker.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ jobs:
234234
- run: |
235235
source ./tool.sh
236236
build_image py-cuda-10.0 latest docker_core/Dockerfile \
237-
--build-arg "ARG_PROFILE_PYTHON=tf1,datascience,nlp,cv" \
237+
--build-arg "ARG_PROFILE_PYTHON=tf1" \
238238
--build-arg "BASE_IMG=cuda_10.0"
239239
alias_image py-cuda-10.0 latest tf1 latest && push_image
240240
@@ -247,7 +247,7 @@ jobs:
247247
- run: |
248248
source ./tool.sh
249249
build_image py-cuda-11.2 latest docker_core/Dockerfile \
250-
--build-arg "ARG_PROFILE_PYTHON=tf2,datascience,nlp,cv" \
250+
--build-arg "ARG_PROFILE_PYTHON=tf2" \
251251
--build-arg "BASE_IMG=cuda_11.2"
252252
alias_image py-cuda-11.2 latest tf2 latest && push_image
253253
@@ -260,7 +260,7 @@ jobs:
260260
- run: |
261261
source ./tool.sh
262262
build_image py-cuda-11.3 latest docker_core/Dockerfile \
263-
--build-arg "ARG_PROFILE_PYTHON=torch,datascience,nlp,cv" \
263+
--build-arg "ARG_PROFILE_PYTHON=torch" \
264264
--build-arg "BASE_IMG=cuda_11.3"
265265
alias_image py-cuda-11.3 latest torch latest && push_image
266266

docker_atom/work/script-setup.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ setup_conda_postprocess() {
3333
}
3434

3535
setup_conda_with_mamba() {
36-
mamba install -y --root-prefix="${CONDA_PREFIX}" --prefix="${CONDA_PREFIX}" conda pip -c "conda-forge/linux-64"
36+
VERSION_PTYHON=$1; shift 1;
37+
mamba install -y --root-prefix="${CONDA_PREFIX}" --prefix="${CONDA_PREFIX}" -c "conda-forge" conda pip python="${VERSION_PTYHON:-3.9}"
3738
rm -rf /opt/conda/pkgs/*
3839
setup_conda_postprocess
3940
}

docker_core/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ RUN source /opt/utils/script-utils.sh \
6262
|| true ) \
6363
# Handle pytorch installation 1.x only, cpu/gpu: https://pytorch.org/get-started/locally/
6464
&& ( [[ ${ARG_PROFILE_PYTHON} == *"torch"* ]] \
65-
&& CUDA_VER=$(echo "${NVIDIA_REQUIRE_CUDA/./}" | cut -d'=' -f 2) \
65+
&& CUDA_VER=$(echo "${CUDA_VERSION:0:4}" | sed 's/\.//' ) \
6666
&& IDX=$( [ -x "$(command -v nvcc)" ] && echo "cu${CUDA_VER:-113}" || echo "cpu" ) \
6767
&& pip install --pre -U torch -f "https://download.pytorch.org/whl/${IDX}/torch_stable.html" \
6868
|| true )

0 commit comments

Comments
 (0)