fuxialexander commited on
Commit
a2aa777
·
1 Parent(s): 64cee5e
Files changed (1) hide show
  1. Dockerfile +5 -7
Dockerfile CHANGED
@@ -4,15 +4,13 @@ FROM fuxialexander/get_model:latest
4
  # Set the working directory in the container to /app
5
  WORKDIR /app
6
 
7
-
8
- # use MAMBA_USER to run the container
9
- USER $MAMBA_USER
10
 
11
  ARG MAMBA_DOCKERFILE_ACTIVATE=1
12
 
13
-
14
  # copy modules from local to container
15
- COPY --chown=$MAMBA_USER:$MAMBA_USER app/main.py /app/main.py
16
 
17
  # Make port 80 available to the world outside this container
18
  EXPOSE 7860
@@ -21,8 +19,8 @@ EXPOSE 7860
21
  ENV MPLCONFIGDIR=/app/matplotlib_cache
22
 
23
  # Create the directory for Matplotlib cache
24
- RUN mkdir -p /app/matplotlib_cache && chown $MAMBA_USER:$MAMBA_USER /app/matplotlib_cache
25
- RUN mkdir -p /app/.gcell_data && chown $MAMBA_USER:$MAMBA_USER /app/.gcell_data
26
 
27
  # Command to run the Gradio app automatically
28
  CMD ["/opt/conda/bin/python", "main.py"]
 
4
  # Set the working directory in the container to /app
5
  WORKDIR /app
6
 
7
+ # Comment out or remove the line below to use the root user
8
+ USER root
 
9
 
10
  ARG MAMBA_DOCKERFILE_ACTIVATE=1
11
 
 
12
  # copy modules from local to container
13
+ COPY --chown=root:root 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
+ RUN mkdir -p /app/matplotlib_cache && chown root:root /app/matplotlib_cache
23
+ RUN mkdir -p /app/.gcell_data && chown root:root /app/.gcell_data
24
 
25
  # Command to run the Gradio app automatically
26
  CMD ["/opt/conda/bin/python", "main.py"]