1
- FROM tensorflow/tensorflow:2.1.0-custom-op-gpu-ubuntu16
1
+ FROM tensorflow/tensorflow:2.1.0-custom-op-gpu-ubuntu16 as base
2
2
3
3
COPY tools/install_deps/tensorflow.txt ./
4
4
@@ -10,7 +10,39 @@ RUN python3 -m pip install -r requirements.txt
10
10
COPY tools/install_deps/finish_bazel_install.sh ./
11
11
RUN bash finish_bazel_install.sh
12
12
13
-
13
+ FROM base as gpu_tests
14
14
COPY ./ /addons
15
15
WORKDIR addons
16
16
CMD ["bash" , "tools/testing/addons_gpu.sh" ]
17
+
18
+ FROM base as interactive_dev
19
+ # This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
20
+ # property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
21
+ # will be updated to match your local UID/GID (when using the dockerFile property).
22
+ # See https://aka.ms/vscode-remote/containers/non-root-user for details.
23
+ ARG USERNAME=vscode
24
+ ARG USER_UID=1000
25
+ ARG USER_GID=$USER_UID
26
+
27
+ # Set to false to skip installing zsh and Oh My ZSH!
28
+ ARG INSTALL_ZSH="false"
29
+
30
+ # Location and expected SHA for common setup script - SHA generated on release
31
+ ARG COMMON_SCRIPT_SOURCE="https://github.com/raw/microsoft/vscode-dev-containers/master/script-library/common-debian.sh"
32
+ ARG COMMON_SCRIPT_SHA="dev-mode"
33
+
34
+ RUN apt-get update \
35
+ && apt-get install -y --no-install-recommends apt-utils dialog wget ca-certificates \
36
+ #
37
+ # Verify git, common tools / libs installed, add/modify non-root user, optionally install zsh
38
+ && wget -q -O /tmp/common-setup.sh $COMMON_SCRIPT_SOURCE \
39
+ && if [ "$COMMON_SCRIPT_SHA" != "dev-mode" ]; then echo "$COMMON_SCRIPT_SHA /tmp/common-setup.sh" | sha256sum -c - ; fi \
40
+ && /bin/bash /tmp/common-setup.sh "$INSTALL_ZSH" "$USERNAME" "$USER_UID" "$USER_GID" \
41
+ && rm /tmp/common-setup.sh \
42
+ && apt-get clean -y \
43
+ && rm -rf /var/lib/apt/lists/*
44
+
45
+ RUN install -d -m 770 -o vscode -g vscode /home/vscode/.ssh/ && ssh-keyscan -t rsa github.com >> /home/vscode/.ssh/known_hosts
46
+
47
+ # Switch back to dialog for any ad-hoc use of apt-get
48
+ ENV DEBIAN_FRONTEND=dialog
0 commit comments