2019-08-13 14:41:43 -04:00
|
|
|
FROM gcr.io/tensorflow-testing/nosla-cuda10.0-cudnn7-ubuntu16.04-manylinux2010
|
2018-12-06 20:04:05 -08:00
|
|
|
LABEL maintainer "Matt Johnson <mattjj@google.com>"
|
|
|
|
|
2019-01-17 15:13:41 -05:00
|
|
|
WORKDIR /
|
2020-07-23 13:08:06 -07:00
|
|
|
# TODO(skyewm): delete the following line when no longer necessary.
|
|
|
|
RUN rm -f /etc/apt/sources.list.d/jonathonf-ubuntu-python-3_6-xenial.list
|
2019-11-21 16:25:24 -08:00
|
|
|
RUN apt-get update
|
|
|
|
RUN apt-get install libffi-dev
|
2020-11-12 18:31:06 +00:00
|
|
|
RUN git clone --branch v1.2.21 https://github.com/pyenv/pyenv.git /pyenv
|
2019-01-17 15:13:41 -05:00
|
|
|
ENV PYENV_ROOT /pyenv
|
|
|
|
RUN /pyenv/bin/pyenv install 3.7.2
|
2019-10-31 11:46:37 -04:00
|
|
|
RUN /pyenv/bin/pyenv install 3.8.0
|
2020-11-12 18:31:06 +00:00
|
|
|
RUN /pyenv/bin/pyenv install 3.9.0
|
2019-10-31 11:46:37 -04:00
|
|
|
|
2021-08-02 09:22:32 -04:00
|
|
|
# We pin numpy to the minimum permitted version to avoid compatibility issues.
|
2022-01-04 12:11:00 -08:00
|
|
|
RUN eval "$(/pyenv/bin/pyenv init -)" && /pyenv/bin/pyenv local 3.7.2 && pip install numpy==1.19.5 setuptools wheel six auditwheel
|
|
|
|
RUN eval "$(/pyenv/bin/pyenv init -)" && /pyenv/bin/pyenv local 3.8.0 && pip install numpy==1.19.5 setuptools wheel six auditwheel
|
|
|
|
RUN eval "$(/pyenv/bin/pyenv init -)" && /pyenv/bin/pyenv local 3.9.0 && pip install numpy==1.19.5 setuptools wheel six auditwheel
|
2019-01-17 15:13:41 -05:00
|
|
|
|
2019-08-13 14:41:43 -04:00
|
|
|
# Change the CUDA version if it doesn't match the installed version.
|
|
|
|
ARG JAX_CUDA_VERSION=10.0
|
2020-01-29 10:47:17 -08:00
|
|
|
COPY install_cuda.sh /install_cuda.sh
|
|
|
|
RUN chmod +x /install_cuda.sh
|
2019-08-13 14:41:43 -04:00
|
|
|
RUN /bin/bash -c 'if [[ ! "$CUDA_VERSION" =~ ^$JAX_CUDA_VERSION.*$ ]]; then \
|
2020-01-29 10:47:17 -08:00
|
|
|
/install_cuda.sh $JAX_CUDA_VERSION; \
|
2019-08-13 14:41:43 -04:00
|
|
|
fi'
|
|
|
|
|
2019-01-17 15:13:41 -05:00
|
|
|
|
2018-12-06 20:04:05 -08:00
|
|
|
WORKDIR /
|
2019-01-17 15:13:41 -05:00
|
|
|
COPY build_wheel_docker_entrypoint.sh /build_wheel_docker_entrypoint.sh
|
2018-12-06 20:04:05 -08:00
|
|
|
RUN chmod +x /build_wheel_docker_entrypoint.sh
|
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
ENV TEST_TMPDIR /build
|
|
|
|
ENTRYPOINT ["/build_wheel_docker_entrypoint.sh"]
|