Spaces:
Running
Running
Commit
·
e18b317
1
Parent(s):
a2aa777
update
Browse files- Dockerfile +10 -5
Dockerfile
CHANGED
|
@@ -5,12 +5,12 @@ FROM fuxialexander/get_model:latest
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
# Comment out or remove the line below to use the root user
|
| 8 |
-
USER
|
| 9 |
|
| 10 |
ARG MAMBA_DOCKERFILE_ACTIVATE=1
|
| 11 |
|
| 12 |
# copy modules from local to container
|
| 13 |
-
COPY --chown
|
| 14 |
|
| 15 |
# Make port 80 available to the world outside this container
|
| 16 |
EXPOSE 7860
|
|
@@ -19,9 +19,14 @@ EXPOSE 7860
|
|
| 19 |
ENV MPLCONFIGDIR=/app/matplotlib_cache
|
| 20 |
|
| 21 |
# Create the directory for Matplotlib cache
|
| 22 |
-
|
| 23 |
-
RUN mkdir -p /app
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
# Command to run the Gradio app automatically
|
| 26 |
CMD ["/opt/conda/bin/python", "main.py"]
|
| 27 |
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
# Comment out or remove the line below to use the root user
|
| 8 |
+
USER $MAMBA_USER
|
| 9 |
|
| 10 |
ARG MAMBA_DOCKERFILE_ACTIVATE=1
|
| 11 |
|
| 12 |
# copy modules from local to container
|
| 13 |
+
COPY --chown=$MAMBA_USER:$MAMBA_USER app/main.py /app/main.py
|
| 14 |
|
| 15 |
# Make port 80 available to the world outside this container
|
| 16 |
EXPOSE 7860
|
|
|
|
| 19 |
ENV MPLCONFIGDIR=/app/matplotlib_cache
|
| 20 |
|
| 21 |
# Create the directory for Matplotlib cache
|
| 22 |
+
USER root
|
| 23 |
+
RUN mkdir -p /app/matplotlib_cache && chown $MAMBA_USER:$MAMBA_USER /app/matplotlib_cache
|
| 24 |
+
RUN mkdir -p /app/.gcell_data && chown $MAMBA_USER:$MAMBA_USER /app/.gcell_data
|
| 25 |
+
# set the permission of the directory to 777
|
| 26 |
+
RUN chmod -R 777 /app/.gcell_data
|
| 27 |
+
RUN chmod -R 777 /app/matplotlib_cache
|
| 28 |
+
RUN chmod -R 777 /app/
|
| 29 |
+
USER $MAMBA_USER
|
| 30 |
# Command to run the Gradio app automatically
|
| 31 |
CMD ["/opt/conda/bin/python", "main.py"]
|
| 32 |
|