Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +18 -0
Dockerfile
CHANGED
@@ -7,9 +7,27 @@ COPY requirements.txt .
|
|
7 |
RUN pip install --upgrade pip && \
|
8 |
pip install --no-cache-dir -r requirements.txt
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
COPY src /app/src
|
11 |
COPY models /app/models
|
12 |
|
|
|
|
|
13 |
EXPOSE 8080
|
14 |
|
15 |
CMD ["python", "-m", "src.main"]
|
|
|
7 |
RUN pip install --upgrade pip && \
|
8 |
pip install --no-cache-dir -r requirements.txt
|
9 |
|
10 |
+
RUN useradd -m -u 1000 user
|
11 |
+
|
12 |
+
USER user
|
13 |
+
|
14 |
+
ENV HOME=/home/user \
|
15 |
+
PATH=/home/user/.local/bin:$PATH \
|
16 |
+
PYTHONPATH=$HOME/app \
|
17 |
+
PYTHONUNBUFFERED=1 \
|
18 |
+
GRADIO_ALLOW_FLAGGING=never \
|
19 |
+
GRADIO_NUM_PORTS=1 \
|
20 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
21 |
+
GRADIO_THEME=huggingface \
|
22 |
+
SYSTEM=spaces
|
23 |
+
|
24 |
+
WORKDIR $HOME/app
|
25 |
+
|
26 |
COPY src /app/src
|
27 |
COPY models /app/models
|
28 |
|
29 |
+
COPY --chown=user . $HOME/app
|
30 |
+
|
31 |
EXPOSE 8080
|
32 |
|
33 |
CMD ["python", "-m", "src.main"]
|