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:
124
124
name : Upload dev container to DockerHub
125
125
needs : [release-wheel, test-with-bazel]
126
126
runs-on : ubuntu-18.04
127
+ env :
128
+ PY_VERSION : ' 3.9'
127
129
if : (github.event_name == 'push' && github.ref == 'refs/heads/master')
128
130
steps :
129
131
- uses : actions/checkout@v2
130
132
- run : |
131
133
set -e -x
132
134
echo ${{ secrets.DOCKER_PW }} | docker login --username ${{ secrets.DOCKER_USER }} --password-stdin
133
135
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
5
5
docker build \
6
6
-f tools/docker/dev_container.Dockerfile \
7
7
--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 \
9
10
--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 1
1
# syntax=docker/dockerfile:1.1.5-experimental
2
- ARG TF_VERSION
3
2
ARG 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
17
4
5
+ ENV TF_NEED_CUDA="1"
18
6
ARG PY_VERSION
19
- RUN ln -sf /usr/local/bin/python$PY_VERSION /usr/bin/python
20
-
21
7
ARG TF_VERSION
22
8
RUN python -m pip install --default-timeout=1000 tensorflow==$TF_VERSION
23
9
@@ -28,7 +14,6 @@ COPY requirements.txt .
28
14
RUN python -m pip install -r requirements.txt
29
15
30
16
COPY ./ /addons
31
- RUN rm /addons/.bazeliskrc
32
17
WORKDIR /addons
33
18
34
19
# -------------------------------------------------------------------
Original file line number Diff line number Diff line change 1
1
# 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
3
8
ARG TF_PACKAGE
4
9
ARG TF_VERSION
5
10
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
-
9
11
RUN pip install --default-timeout=1000 $TF_PACKAGE==$TF_VERSION
10
12
11
13
COPY tools/install_deps /install_deps
You can’t perform that action at this time.
0 commit comments