Spaces:
Paused
Paused
Gaurav Yadav
commited on
Update Dockerfile
Browse files- 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
|
| 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 |
-
#
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
# RUN chown -R appuser:appuser /app/examples
|
| 58 |
|
| 59 |
USER appuser
|
| 60 |
|
| 61 |
-
# Expose the port
|
| 62 |
-
EXPOSE 7860
|
| 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"]
|