Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +13 -1
Dockerfile
CHANGED
@@ -1,10 +1,22 @@
|
|
1 |
FROM python:3.9
|
2 |
WORKDIR /app
|
3 |
-
USER root
|
4 |
|
5 |
COPY ./requirements.txt /app/requirements.txt
|
6 |
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
ENV PORT=7860 \
|
9 |
URL_GRADIO=https://rgres-drawing2map-api.hf.space/
|
10 |
|
|
|
1 |
FROM python:3.9
|
2 |
WORKDIR /app
|
|
|
3 |
|
4 |
COPY ./requirements.txt /app/requirements.txt
|
5 |
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
6 |
|
7 |
+
# Set up a new user named "user" with user ID 1000
|
8 |
+
RUN useradd -m -u 1000 user
|
9 |
+
|
10 |
+
# Switch to the "user" user
|
11 |
+
USER user
|
12 |
+
|
13 |
+
# Set home to the user's home directory
|
14 |
+
ENV HOME=/home/user \
|
15 |
+
PATH=/home/user/.local/bin:$PATH
|
16 |
+
|
17 |
+
# Set the working directory to the user's home directory
|
18 |
+
WORKDIR $HOME/app
|
19 |
+
|
20 |
ENV PORT=7860 \
|
21 |
URL_GRADIO=https://rgres-drawing2map-api.hf.space/
|
22 |
|