@@ -12,34 +12,37 @@ RUN yum install -y \
12
12
devtoolset-${DEVTOOLSET_VERSION}-gcc \
13
13
devtoolset-${DEVTOOLSET_VERSION}-gcc-c++ \
14
14
devtoolset-${DEVTOOLSET_VERSION}-gcc-gfortran \
15
- devtoolset-${DEVTOOLSET_VERSION}-binutils
15
+ devtoolset-${DEVTOOLSET_VERSION}-binutils \
16
+ wget \
17
+ rapidjson-devel \
18
+ glog-devel && \
19
+ yum clean all
20
+
16
21
ENV PATH=/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH
17
22
ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH
18
23
19
- RUN yum install -y wget rapidjson-devel glog-devel
20
-
21
24
FROM base as cuda
22
- ADD manywheel/scripts/install_cuda.sh install_cuda.sh
23
- RUN bash ./ install_cuda.sh ${BASE_CUDA_VERSION} && rm install_cuda.sh
25
+ COPY manywheel/scripts/install_cuda.sh /tmp/ install_cuda.sh
26
+ RUN bash /tmp/ install_cuda.sh ${BASE_CUDA_VERSION} && rm /tmp/ install_cuda.sh
24
27
25
28
FROM base as conda
26
- ADD manywheel/scripts/install_conda.sh install_conda.sh
27
- RUN bash ./ install_conda.sh && rm install_conda.sh
28
-
29
- RUN /opt/conda/bin/conda create -n py39 python=3.9 -yq && \
30
- /opt/conda/envs/py39/ bin/pip install pybind11 && \
31
- /opt/conda/bin/conda create -n py310 python=3.10 -yq && \
32
- /opt/conda/envs/py310/bin/pip install pybind11 && \
33
- /opt/conda/bin/conda create -n py311 python= 3.11 -yq && \
34
- /opt/conda/envs/py311/bin/pip install pybind11 && \
35
- /opt/conda/bin/conda create -n py312 python=3.12 -yq && \
36
- /opt/conda/envs/py312/ bin/pip install pybind11
37
- /opt/conda/bin/conda create -n py313 python=3.13 -yq && \
38
- /opt/conda/envs/py313/ bin/pip install pybind11
29
+ COPY manywheel/scripts/install_conda.sh /tmp/ install_conda.sh
30
+ RUN bash /tmp/ install_conda.sh && rm /tmp/ install_conda.sh
31
+
32
+ # Accept Anaconda's Terms of Service to avoid `CondaToSNonInteractiveError`
33
+ RUN /opt/conda/bin/conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
34
+ /opt/conda/bin/conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
35
+
36
+ RUN PY_VERSIONS=(3.9 3.10 3.11 3.12 3.13) && \
37
+ for pyver in "${PY_VERSIONS[@]}"; do \
38
+ /opt/conda/bin/conda create -n py${pyver//./} python=${pyver} -yq && \
39
+ /opt/conda/envs/py${pyver//./}/ bin/pip install --no-cache-dir pybind11; \
40
+ done && \
41
+ /opt/conda/bin/conda clean -ya
39
42
40
43
FROM base as cuda_final
41
- COPY --from=cuda /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION}
44
+ COPY --from=cuda /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda-${BASE_CUDA_VERSION}
42
45
RUN ln -sf /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda
43
46
ENV PATH=/usr/local/cuda/bin:$PATH
44
- COPY --from=conda /opt/conda /opt/conda
47
+ COPY --from=conda /opt/conda /opt/conda
45
48
RUN /opt/conda/bin/conda init bash
0 commit comments