-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtutorial2.Dockerfile
More file actions
29 lines (22 loc) · 1.19 KB
/
tutorial2.Dockerfile
File metadata and controls
29 lines (22 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM tensorflow/tensorflow:2.7.0-gpu
ENV DEBIAN_FRONTEND=noninteractive
# This is added to fix docker build error related to Nvidia key update.
RUN rm -f /etc/apt/sources.list.d/cuda.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
# Install google cloud SDK
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" \
| tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg \
| apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && apt-get install google-cloud-sdk -y
RUN pip install --upgrade pip
RUN pip install Pillow==8.4.0 && \
pip install pyglove==0.1.0 && \
pip install google-cloud-storage==2.6.0 && \
pip install protobuf==3.20.*
# Make sure gsutil will use the default service account
RUN echo '[GoogleCompute]\nservice_account = default' > /etc/boto.cfg
RUN mkdir /root/training
COPY . /root/training/
ENV PATH="/root/training/:${PATH}"
WORKDIR /root/training
RUN mv third_party/tutorial/tutorial2_search_spaces.py tutorial2_search_spaces.py
ENTRYPOINT ["python", "tutorial2_search_spaces.py"]