Spaces:
Runtime error
Runtime error
ksvmuralidhar
commited on
Update Dockerfile
Browse files- Dockerfile +20 -7
Dockerfile
CHANGED
@@ -1,7 +1,20 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# https://discuss.huggingface.co/t/permission-denied-for-writing-files-within-spaces/29799/2
|
2 |
+
# https://huggingface.co/docs/hub/spaces-sdks-docker#permissions
|
3 |
+
|
4 |
+
FROM python:3.10-slim
|
5 |
+
WORKDIR /code
|
6 |
+
COPY ./requirements.txt /code/requirements.txt
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
+
RUN apt update && apt install -y ffmpeg
|
9 |
+
|
10 |
+
RUN useradd -m -u 1000 user
|
11 |
+
USER user
|
12 |
+
ENV HOME=/home/user \
|
13 |
+
PATH=/home/user/.local/bin:$PATH
|
14 |
+
|
15 |
+
WORKDIR $HOME/app
|
16 |
+
|
17 |
+
COPY --chown=user . $HOME/app
|
18 |
+
|
19 |
+
EXPOSE 7860
|
20 |
+
CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "120", "app:app"]
|