Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
FROM continuumio/miniconda3:24.1.2-0
|
4 |
|
5 |
-
#
|
6 |
RUN mkdir -p /usr/share/man/man1
|
7 |
RUN apt-get update && \
|
8 |
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
|
@@ -19,6 +19,7 @@ RUN apt-get update && \
|
|
19 |
xauth \
|
20 |
&& rm -rf /var/lib/apt/lists/*
|
21 |
|
|
|
22 |
RUN conda install python=3.8.13 -y
|
23 |
|
24 |
# Install Python and model dependencies
|
@@ -29,16 +30,16 @@ RUN pip install mmdet==2.27.0
|
|
29 |
RUN pip install torchserve
|
30 |
RUN pip install mmpose==0.29.0
|
31 |
RUN pip install torchvision==0.15.1
|
32 |
-
RUN pip install numpy==1.24.4 scikit-image scipy opencv-python requests pyyaml flask glfw PyOpenGL Pillow shapely tqdm
|
33 |
|
34 |
-
#
|
35 |
RUN git clone https://github.com/jin-s13/xtcocoapi.git
|
36 |
WORKDIR xtcocoapi
|
37 |
RUN pip install -r requirements.txt
|
38 |
RUN python setup.py install
|
39 |
WORKDIR /
|
40 |
|
41 |
-
#
|
42 |
RUN mkdir -p /home/torchserve/model-store
|
43 |
RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_detector.mar -P /home/torchserve/model-store/
|
44 |
RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_pose_estimator.mar -P /home/torchserve/model-store/
|
@@ -63,7 +64,7 @@ USER appuser
|
|
63 |
|
64 |
EXPOSE 7860
|
65 |
|
66 |
-
# Start TorchServe, warm-up models, then run the app.
|
67 |
# Using xvfb-run for headless rendering.
|
68 |
CMD sh -c "\
|
69 |
torchserve --start --ncs --ts-config /home/torchserve/config.properties && \
|
|
|
2 |
|
3 |
FROM continuumio/miniconda3:24.1.2-0
|
4 |
|
5 |
+
# Install OS dependencies including xauth for xvfb
|
6 |
RUN mkdir -p /usr/share/man/man1
|
7 |
RUN apt-get update && \
|
8 |
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
|
|
|
19 |
xauth \
|
20 |
&& rm -rf /var/lib/apt/lists/*
|
21 |
|
22 |
+
# Install Python 3.8.13
|
23 |
RUN conda install python=3.8.13 -y
|
24 |
|
25 |
# Install Python and model dependencies
|
|
|
30 |
RUN pip install torchserve
|
31 |
RUN pip install mmpose==0.29.0
|
32 |
RUN pip install torchvision==0.15.1
|
33 |
+
RUN pip install numpy==1.24.4 scikit-image scipy opencv-python requests pyyaml flask flask-cors glfw PyOpenGL Pillow shapely tqdm gradio
|
34 |
|
35 |
+
# Bugfix for xtcocoapi, a dependency of mmpose
|
36 |
RUN git clone https://github.com/jin-s13/xtcocoapi.git
|
37 |
WORKDIR xtcocoapi
|
38 |
RUN pip install -r requirements.txt
|
39 |
RUN python setup.py install
|
40 |
WORKDIR /
|
41 |
|
42 |
+
# Prepare TorchServe
|
43 |
RUN mkdir -p /home/torchserve/model-store
|
44 |
RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_detector.mar -P /home/torchserve/model-store/
|
45 |
RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_pose_estimator.mar -P /home/torchserve/model-store/
|
|
|
64 |
|
65 |
EXPOSE 7860
|
66 |
|
67 |
+
# Start TorchServe, warm-up models, then run the Flask app.
|
68 |
# Using xvfb-run for headless rendering.
|
69 |
CMD sh -c "\
|
70 |
torchserve --start --ncs --ts-config /home/torchserve/config.properties && \
|