Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +9 -5
Dockerfile
CHANGED
@@ -1,9 +1,12 @@
|
|
1 |
# Start with a base image that includes CUDA
|
2 |
-
FROM nvidia/cuda:11.4.1-base-ubuntu20.04
|
|
|
3 |
|
4 |
RUN apt update && apt install -y software-properties-common
|
5 |
RUN add-apt-repository ppa:deadsnakes/ppa
|
6 |
-
RUN apt install -y python3.
|
|
|
|
|
7 |
|
8 |
# Set the timezone
|
9 |
ENV TZ=Europe/Berlin
|
@@ -17,12 +20,13 @@ RUN dpkg-reconfigure --frontend noninteractive tzdata
|
|
17 |
# Install the libglib2.0-0 package
|
18 |
RUN apt-get update && apt-get install -y libgl1-mesa-glx
|
19 |
RUN apt-get update && apt-get install -y libglib2.0-0
|
20 |
-
RUN apt-get update && apt-get install -y python3
|
21 |
|
22 |
# Install the Python dependencies
|
23 |
WORKDIR /code
|
24 |
COPY ./requirements.txt /code/requirements.txt
|
25 |
-
RUN python3
|
|
|
26 |
|
27 |
# Set up a new user named "user" with user ID 1000
|
28 |
RUN useradd -m -u 1000 user
|
@@ -45,4 +49,4 @@ RUN chmod o+w /home/user/app
|
|
45 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
46 |
COPY --chown=user . /home/user/app
|
47 |
|
48 |
-
CMD ["python3
|
|
|
1 |
# Start with a base image that includes CUDA
|
2 |
+
# FROM nvidia/cuda:11.4.1-base-ubuntu20.04
|
3 |
+
FROM huggingface/transformers-tensorflow-gpu
|
4 |
|
5 |
RUN apt update && apt install -y software-properties-common
|
6 |
RUN add-apt-repository ppa:deadsnakes/ppa
|
7 |
+
# RUN apt install -y python3.
|
8 |
+
|
9 |
+
RUN python --version
|
10 |
|
11 |
# Set the timezone
|
12 |
ENV TZ=Europe/Berlin
|
|
|
20 |
# Install the libglib2.0-0 package
|
21 |
RUN apt-get update && apt-get install -y libgl1-mesa-glx
|
22 |
RUN apt-get update && apt-get install -y libglib2.0-0
|
23 |
+
RUN apt-get update && apt-get install -y python3 python3-pip
|
24 |
|
25 |
# Install the Python dependencies
|
26 |
WORKDIR /code
|
27 |
COPY ./requirements.txt /code/requirements.txt
|
28 |
+
RUN python3 -m pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
29 |
+
|
30 |
|
31 |
# Set up a new user named "user" with user ID 1000
|
32 |
RUN useradd -m -u 1000 user
|
|
|
49 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
50 |
COPY --chown=user . /home/user/app
|
51 |
|
52 |
+
CMD ["python3", "main.py"]
|