Thiago Hersan
commited on
Commit
•
6b2bbe0
1
Parent(s):
7801c68
using gradio template
Browse files- Dockerfile +17 -5
Dockerfile
CHANGED
@@ -6,12 +6,24 @@ COPY ./requirements.txt /code/requirements.txt
|
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
9 |
-
|
10 |
-
COPY examples /code/examples
|
11 |
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
CMD ["python", "app.py"]
|
|
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
9 |
+
RUN useradd -m -u 1000 user
|
|
|
10 |
|
11 |
+
USER user
|
12 |
|
13 |
+
ENV HOME=/home/user \
|
14 |
+
PATH=/home/user/.local/bin:$PATH \
|
15 |
+
PYTHONPATH=$HOME/app \
|
16 |
+
PYTHONUNBUFFERED=1 \
|
17 |
+
GRADIO_ALLOW_FLAGGING=never \
|
18 |
+
GRADIO_NUM_PORTS=1 \
|
19 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
20 |
+
GRADIO_THEME=huggingface \
|
21 |
+
SYSTEM=spaces \
|
22 |
+
HF_HOME=/data/.huggingface
|
23 |
+
|
24 |
+
|
25 |
+
WORKDIR $HOME/app
|
26 |
+
|
27 |
+
COPY --chown=user ./examples ./app.py $HOME/app
|
28 |
|
29 |
CMD ["python", "app.py"]
|