Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +5 -5
Dockerfile
CHANGED
|
@@ -9,7 +9,9 @@ ARG INSTALL_CHANNEL=pytorch
|
|
| 9 |
# Automatically set by buildx
|
| 10 |
ARG TARGETPLATFORM
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
|
| 14 |
#ENV HOME=/home/user \
|
| 15 |
# PATH=/home/user/.local/bin:/opt/conda/bin:$PATH
|
|
@@ -59,11 +61,9 @@ COPY --chown=user . /app
|
|
| 59 |
USER user
|
| 60 |
WORKDIR /app
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
#RUN chmod 777 /app/*.py
|
| 65 |
-
|
| 66 |
-
|
| 67 |
RUN chmod +x /app/entrypoint.sh
|
| 68 |
|
| 69 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 9 |
# Automatically set by buildx
|
| 10 |
ARG TARGETPLATFORM
|
| 11 |
|
| 12 |
+
# Using a 'user' seems to give permission errors for writing to txt files,
|
| 13 |
+
# unless files are made world-read/write-able.
|
| 14 |
+
RUN useradd -m -u 1000 user
|
| 15 |
|
| 16 |
#ENV HOME=/home/user \
|
| 17 |
# PATH=/home/user/.local/bin:/opt/conda/bin:$PATH
|
|
|
|
| 61 |
USER user
|
| 62 |
WORKDIR /app
|
| 63 |
|
|
|
|
|
|
|
| 64 |
#RUN chmod 777 /app/*.py
|
| 65 |
+
RUN chmod 777 /app/attempts.txt
|
| 66 |
+
RUN chmod 777 /app/failed_attempts.txt
|
| 67 |
RUN chmod +x /app/entrypoint.sh
|
| 68 |
|
| 69 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|