ygauravyy commited on
Commit
464749e
1 Parent(s): e3df007

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +46 -0
Dockerfile ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # syntax = docker/dockerfile:1.2
2
+
3
+ FROM continuumio/miniconda3:24.1.2-0
4
+
5
+ # install os dependencies
6
+ RUN mkdir -p /usr/share/man/man1
7
+ RUN apt-get update && \
8
+ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
9
+ ca-certificates \
10
+ curl \
11
+ vim \
12
+ sudo \
13
+ default-jre \
14
+ git \
15
+ gcc \
16
+ build-essential \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
+ RUN conda install python=3.8.13 -y
20
+
21
+
22
+ # install python dependencies
23
+ RUN pip install openmim
24
+ RUN pip install torch==2.0.0
25
+ RUN mim install mmcv-full==1.7.0
26
+ RUN pip install mmdet==2.27.0
27
+ RUN pip install torchserve
28
+
29
+ # bugfix for xtcocoapi, an mmpose dependency
30
+ RUN git clone https://github.com/jin-s13/xtcocoapi.git
31
+ WORKDIR xtcocoapi
32
+ RUN pip install -r requirements.txt
33
+ RUN python setup.py install
34
+ WORKDIR /
35
+ RUN pip install mmpose==0.29.0
36
+ RUN pip install torchvision==0.15.1 # solve torch version problem
37
+ RUN pip install numpy==1.24.4 #solve numpy version problem
38
+
39
+ # prep torchserve
40
+ RUN mkdir -p /home/torchserve/model-store
41
+ RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_detector.mar -P /home/torchserve/model-store/
42
+ RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_pose_estimator.mar -P /home/torchserve/model-store/
43
+ COPY config.properties /home/torchserve/config.properties
44
+
45
+ # starting command
46
+ CMD /opt/conda/bin/torchserve --start --disable-token-auth --ts-config /home/torchserve/config.properties && sleep infinity