File size: 748 Bytes
f3e010b
464749e
f3e010b
 
 
 
464749e
f3e010b
464749e
f3e010b
 
464749e
f3e010b
 
 
464749e
f3e010b
464749e
 
 
 
f3e010b
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM python:3.9

# Create a non-root user
RUN useradd -m -u 1000 user
USER user
WORKDIR /home/user

ENV PATH="/home/user/.local/bin:$PATH"

# Copy your code
COPY --chown=user . .

# Install dependencies
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
RUN pip install --no-cache-dir -e .

# Prepare TorchServe model store
RUN mkdir -p /home/torchserve/model-store
RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_detector.mar -P /home/torchserve/model-store/
RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_pose_estimator.mar -P /home/torchserve/model-store/

# Expose port 7860 for Gradio
EXPOSE 7860

CMD ["python", "app.py"]