fuxialexander commited on
Commit
cca72ca
·
1 Parent(s): 7b04c5f

update docker

Browse files
Files changed (2) hide show
  1. Dockerfile +16 -5
  2. Dockerfile-dockerhub +0 -29
Dockerfile CHANGED
@@ -1,16 +1,27 @@
1
- # This is the dockerfile for the Gradio app on huggingface
2
- FROM fuxialexander/getdemo:latest
3
 
4
- # Switch to mambauser with updated UID
 
 
5
  USER $MAMBA_USER
 
6
  # Set the working directory in the container to /app
7
  WORKDIR /app
8
 
9
  ARG MAMBA_DOCKERFILE_ACTIVATE=1
10
 
11
- COPY --chown=$MAMBA_USER:$MAMBA_USER app/main.py /app/app/main.py
 
 
 
 
 
 
12
 
 
 
13
  # Set the working directory where your app resides
14
 
15
  # Command to run the Gradio app automatically
16
- CMD ["python", "/app/app/main.py", "-n", "0.0.0.0", "-p", "7860", "-u", "s3://2023-get-xf2217/get_demo", "-d", "/app/data"]
 
1
+ # This is the dockerfile for dockerhub fuxialexander/getdemo:latest
2
+ FROM fuxialexander/get_model:latest
3
 
4
+
5
+ USER root
6
+ RUN usermod -u 1000 $MAMBA_USER
7
  USER $MAMBA_USER
8
+
9
  # Set the working directory in the container to /app
10
  WORKDIR /app
11
 
12
  ARG MAMBA_DOCKERFILE_ACTIVATE=1
13
 
14
+ USER $MAMBA_USER
15
+
16
+ # copy modules from local to container
17
+ COPY --chown=$MAMBA_USER:$MAMBA_USER app/main.py /app/main.py
18
+
19
+ # clean all mamba caches and remove unnecessary files
20
+ RUN micromamba clean --all --yes
21
 
22
+ # Make port 80 available to the world outside this container
23
+ EXPOSE 7860
24
  # Set the working directory where your app resides
25
 
26
  # Command to run the Gradio app automatically
27
+ CMD ["python", "main.py"]
Dockerfile-dockerhub DELETED
@@ -1,29 +0,0 @@
1
- # This is the dockerfile for dockerhub fuxialexander/getdemo:latest
2
- FROM fuxialexander/get_model:latest
3
-
4
-
5
- USER root
6
- RUN usermod -u 1000 $MAMBA_USER
7
- USER $MAMBA_USER
8
-
9
- # Set the working directory in the container to /app
10
- WORKDIR /app
11
-
12
- ARG MAMBA_DOCKERFILE_ACTIVATE=1
13
-
14
- USER $MAMBA_USER
15
-
16
- # copy modules from local to container
17
- COPY --chown=$MAMBA_USER:$MAMBA_USER app /app/app
18
-
19
- # clean all mamba caches and remove unnecessary files
20
- RUN micromamba clean --all --yes
21
-
22
- WORKDIR /app
23
-
24
- # Make port 80 available to the world outside this container
25
- EXPOSE 7860
26
- # Set the working directory where your app resides
27
-
28
- # Command to run the Gradio app automatically
29
- CMD ["python", "app/main.py"]