@@ -12,34 +12,37 @@ RUN yum install -y \
1212 devtoolset-${DEVTOOLSET_VERSION}-gcc \
1313 devtoolset-${DEVTOOLSET_VERSION}-gcc-c++ \
1414 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+
1621ENV PATH=/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/bin:$PATH
1722ENV LD_LIBRARY_PATH=/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/lib64:/opt/rh/devtoolset-${DEVTOOLSET_VERSION}/root/usr/lib:$LD_LIBRARY_PATH
1823
19- RUN yum install -y wget rapidjson-devel glog-devel
20-
2124FROM 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
2427
2528FROM 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
3942
4043FROM 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}
4245RUN ln -sf /usr/local/cuda-${BASE_CUDA_VERSION} /usr/local/cuda
4346ENV PATH=/usr/local/cuda/bin:$PATH
44- COPY --from=conda /opt/conda /opt/conda
47+ COPY --from=conda /opt/conda /opt/conda
4548RUN /opt/conda/bin/conda init bash
0 commit comments