Spaces:
Building
Building
Update Dockerfile
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
@@ -15,10 +15,12 @@ RUN apt-get update && \
|
|
15 |
gcc \
|
16 |
build-essential \
|
17 |
wget \
|
|
|
18 |
&& rm -rf /var/lib/apt/lists/*
|
19 |
|
20 |
RUN conda install python=3.8.13 -y
|
21 |
|
|
|
22 |
RUN pip install openmim
|
23 |
RUN pip install torch==2.0.0
|
24 |
RUN mim install mmcv-full==1.7.0
|
@@ -59,5 +61,5 @@ USER appuser
|
|
59 |
|
60 |
EXPOSE 7860
|
61 |
|
62 |
-
# Start TorchServe
|
63 |
-
CMD sh -c "torchserve --start --ts-config /home/torchserve/config.properties && sleep 10 && python app.py"
|
|
|
15 |
gcc \
|
16 |
build-essential \
|
17 |
wget \
|
18 |
+
xvfb \
|
19 |
&& rm -rf /var/lib/apt/lists/*
|
20 |
|
21 |
RUN conda install python=3.8.13 -y
|
22 |
|
23 |
+
# Install Python and model dependencies
|
24 |
RUN pip install openmim
|
25 |
RUN pip install torch==2.0.0
|
26 |
RUN mim install mmcv-full==1.7.0
|
|
|
61 |
|
62 |
EXPOSE 7860
|
63 |
|
64 |
+
# Start TorchServe, wait a bit, then run app inside Xvfb
|
65 |
+
CMD sh -c "torchserve --start --ts-config /home/torchserve/config.properties && sleep 10 && xvfb-run -a python app.py"
|