File tree Expand file tree Collapse file tree 4 files changed +15
-25
lines changed
Expand file tree Collapse file tree 4 files changed +15
-25
lines changed Original file line number Diff line number Diff line change @@ -124,11 +124,13 @@ jobs:
124124 name : Upload dev container to DockerHub
125125 needs : [release-wheel, test-with-bazel]
126126 runs-on : ubuntu-18.04
127+ env :
128+ PY_VERSION : ' 3.9'
127129 if : (github.event_name == 'push' && github.ref == 'refs/heads/master')
128130 steps :
129131 - uses : actions/checkout@v2
130132 - run : |
131133 set -e -x
132134 echo ${{ secrets.DOCKER_PW }} | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
133135 bash .github/workflows/github_build_dev_container.sh
134- docker push tfaddons/dev_container:latest-cpu
136+ docker push tfaddons/dev_container:latest-gpu
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ set -x -e
55docker build \
66 -f tools/docker/dev_container.Dockerfile \
77 --build-arg TF_VERSION=2.7.0 \
8- --build-arg TF_PACKAGE=tensorflow-cpu \
8+ --build-arg TF_PACKAGE=tensorflow \
9+ --build-arg PY_VERSION=$PY_VERSION \
910 --no-cache \
10- --target dev_container_cpu \
11- -t tfaddons/dev_container:latest-cpu ./
11+ --target dev_container \
12+ -t tfaddons/dev_container:latest-gpu ./
Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1.1.5-experimental
2- ARG TF_VERSION
32ARG PY_VERSION
4- FROM gcr.io/tensorflow-testing/nosla-cuda11.2-cudnn8.1-ubuntu18.04-manylinux2010-multipython as base_install
5- ENV TF_NEED_CUDA="1"
6-
7- # Required for setuptools v50.0.0
8- # https://setuptools.readthedocs.io/en/latest/history.html#v50-0-0
9- # https://github.com/pypa/setuptools/issues/2352
10- ENV SETUPTOOLS_USE_DISTUTILS=stdlib
11-
12- # Fix presented in
13- # https://stackoverflow.com/questions/44967202/pip-is-showing-error-lsb-release-a-returned-non-zero-exit-status-1/44967506
14- RUN echo "#! /usr/bin/python2.7" >> /usr/bin/lsb_release2
15- RUN cat /usr/bin/lsb_release >> /usr/bin/lsb_release2
16- RUN mv /usr/bin/lsb_release2 /usr/bin/lsb_release
3+ FROM tensorflow/build:latest-python$PY_VERSION as base_install
174
5+ ENV TF_NEED_CUDA="1"
186ARG PY_VERSION
19- RUN ln -sf /usr/local/bin/python$PY_VERSION /usr/bin/python
20-
217ARG TF_VERSION
228RUN python -m pip install --default-timeout=1000 tensorflow==$TF_VERSION
239
@@ -28,7 +14,6 @@ COPY requirements.txt .
2814RUN python -m pip install -r requirements.txt
2915
3016COPY ./ /addons
31- RUN rm /addons/.bazeliskrc
3217WORKDIR /addons
3318
3419# -------------------------------------------------------------------
Original file line number Diff line number Diff line change 11# syntax=docker/dockerfile:1.1.5-experimental
2- FROM gcr.io/tensorflow-testing/nosla-cuda11.2-cudnn8.1-ubuntu18.04-manylinux2010-multipython as dev_container_cpu
2+ ARG PY_VERSION
3+ ARG IMAGE_TYPE
4+
5+ # Currenly all of our dev images are GPU capable but at a cost of being quite large.
6+ # See https://github.com/tensorflow/build/pull/47
7+ FROM tensorflow/build:latest-python$PY_VERSION as dev_container
38ARG TF_PACKAGE
49ARG TF_VERSION
510
6- RUN ln -sf /usr/local/bin/python3.9 /usr/bin/python
7- RUN ln -sf /usr/local/bin/pip3.9 /usr/local/bin/pip
8-
911RUN pip install --default-timeout=1000 $TF_PACKAGE==$TF_VERSION
1012
1113COPY tools/install_deps /install_deps
You can’t perform that action at this time.
0 commit comments