Spaces:
Sleeping
Sleeping
test
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
FROM
|
|
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
@@ -6,10 +7,13 @@ COPY ./requirements.txt /code/requirements.txt
|
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
|
|
9 |
# Set up a new user named "user" with user ID 1000
|
10 |
RUN useradd -m -u 1000 user
|
|
|
11 |
# Switch to the "user" user
|
12 |
USER user
|
|
|
13 |
# Set home to the user's home directory
|
14 |
ENV HOME=/home/user \
|
15 |
PATH=/home/user/.local/bin:$PATH \
|
@@ -20,11 +24,13 @@ ENV HOME=/home/user \
|
|
20 |
GRADIO_SERVER_NAME=0.0.0.0 \
|
21 |
GRADIO_THEME=huggingface \
|
22 |
SYSTEM=spaces
|
23 |
-
|
24 |
# Set the working directory to the user's home directory
|
25 |
WORKDIR $HOME/app
|
26 |
|
27 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
28 |
COPY --chown=user . $HOME/app
|
29 |
|
|
|
30 |
CMD ["python", "app.py"]
|
|
|
|
1 |
+
FROM pengchuanzhang/pytorch:ubuntu20.04_torch1.9-cuda11.3-nccl2.9.9
|
2 |
+
|
3 |
|
4 |
WORKDIR /code
|
5 |
|
|
|
7 |
|
8 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
9 |
|
10 |
+
|
11 |
# Set up a new user named "user" with user ID 1000
|
12 |
RUN useradd -m -u 1000 user
|
13 |
+
|
14 |
# Switch to the "user" user
|
15 |
USER user
|
16 |
+
|
17 |
# Set home to the user's home directory
|
18 |
ENV HOME=/home/user \
|
19 |
PATH=/home/user/.local/bin:$PATH \
|
|
|
24 |
GRADIO_SERVER_NAME=0.0.0.0 \
|
25 |
GRADIO_THEME=huggingface \
|
26 |
SYSTEM=spaces
|
27 |
+
|
28 |
# Set the working directory to the user's home directory
|
29 |
WORKDIR $HOME/app
|
30 |
|
31 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
32 |
COPY --chown=user . $HOME/app
|
33 |
|
34 |
+
#CMD ["python", "main.py"]
|
35 |
CMD ["python", "app.py"]
|
36 |
+
#RUN main.py
|