Update Dockerfile
Browse files- Dockerfile +20 -0
Dockerfile
CHANGED
@@ -1,6 +1,26 @@
|
|
1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
FROM debian:bullseye-slim
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
ENV NVIDIA_VISIBLE_DEVICES all
|
5 |
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
|
6 |
ENV NVIDIA_REQUIRE_CUDA "cuda>=8.0"
|
|
|
1 |
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
# you will also find guides on how best to write your Dockerfile
|
3 |
FROM debian:bullseye-slim
|
4 |
+
|
5 |
+
# Install prerequisites
|
6 |
+
RUN apt-get update -y && \
|
7 |
+
apt-get install -y apt-transport-https ca-certificates gnupg curl
|
8 |
+
|
9 |
+
# Add the Cloud SDK distribution URI as a package source
|
10 |
+
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.asc] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
|
11 |
+
|
12 |
+
# Import the Google Cloud public key
|
13 |
+
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | tee /usr/share/keyrings/cloud.google.asc
|
14 |
+
|
15 |
+
# Update the package list and install the Google Cloud CLI
|
16 |
+
RUN apt-get update -y && apt-get install -y google-cloud-sdk
|
17 |
+
|
18 |
+
# You can include additional commands to configure or use the gcloud CLI here
|
19 |
+
# For example, you can authenticate with your service account key file:
|
20 |
+
COPY your-service-account-key.json /tmp/key.json
|
21 |
+
RUN gcloud auth activate-service-account --key-file=/tmp/key.json
|
22 |
+
|
23 |
+
# ... further instructions ...
|
24 |
ENV NVIDIA_VISIBLE_DEVICES all
|
25 |
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
|
26 |
ENV NVIDIA_REQUIRE_CUDA "cuda>=8.0"
|