ygauravyy commited on
Commit
3ff7d27
1 Parent(s): 0194c93

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -9
Dockerfile CHANGED
@@ -35,7 +35,7 @@ RUN python setup.py install
35
  WORKDIR /
36
  RUN pip install mmpose==0.29.0
37
  RUN pip install torchvision==0.15.1 # solve torch version problem
38
- RUN pip install numpy==1.24.4 # solve numpy version problem
39
 
40
  # prep torchserve (optional)
41
  RUN mkdir -p /home/torchserve/model-store
@@ -48,17 +48,14 @@ RUN adduser --disabled-password --gecos '' --uid 1000 appuser
48
 
49
  WORKDIR /app
50
  COPY app.py /app
51
- # Pre-create directories and adjust permissions
52
- RUN mkdir uploads_gradio outputs_gradio && chown appuser:appuser uploads_gradio outputs_gradio
53
 
54
- # If your code references the `examples` directory, copy it and chown as well
55
- # Assuming you have an `examples` directory in your local context:
56
- # COPY examples /app/examples
57
- # RUN chown -R appuser:appuser /app/examples
58
 
59
  USER appuser
60
 
61
- # Expose the port that Gradio will listen on
62
- EXPOSE 7860 8080 8081 8082
63
 
64
  CMD ["python", "app.py"]
 
35
  WORKDIR /
36
  RUN pip install mmpose==0.29.0
37
  RUN pip install torchvision==0.15.1 # solve torch version problem
38
+ RUN pip install numpy==1.24.4 # solve numpy version problem
39
 
40
  # prep torchserve (optional)
41
  RUN mkdir -p /home/torchserve/model-store
 
48
 
49
  WORKDIR /app
50
  COPY app.py /app
 
 
51
 
52
+ # Pre-create directories needed by the app and Gradio, and set permissions
53
+ RUN mkdir -p uploads_gradio outputs_gradio flagged && \
54
+ chown -R appuser:appuser /app
 
55
 
56
  USER appuser
57
 
58
+ # Expose the port for Gradio
59
+ EXPOSE 7860
60
 
61
  CMD ["python", "app.py"]