Spaces:
Sleeping
Sleeping
simonduerr
commited on
Commit
•
4928a82
1
Parent(s):
7dfd307
Create Dockerfile
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM nvidia/cuda:11.6.1-base-ubuntu20.04
|
2 |
+
|
3 |
+
WORKDIR /code
|
4 |
+
|
5 |
+
COPY ./requirements.txt /code/requirements.txt
|
6 |
+
|
7 |
+
RUN pip install gradio==3.46.0
|
8 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
9 |
+
|
10 |
+
# Set up a new user named "user" with user ID 1000
|
11 |
+
RUN useradd -m -u 1000 user
|
12 |
+
|
13 |
+
# Switch to the "user" user
|
14 |
+
USER user
|
15 |
+
|
16 |
+
# Set home to the user's home directory
|
17 |
+
ENV HOME=/home/user \
|
18 |
+
PATH=/home/user/.local/bin:$PATH
|
19 |
+
|
20 |
+
# Set the working directory to the user's home directory
|
21 |
+
WORKDIR $HOME/app
|
22 |
+
|
23 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
24 |
+
COPY --chown=user . $HOME/app
|
25 |
+
|
26 |
+
CMD ["python", "app.py"]
|