FROM python:3.9 RUN useradd -m -u 1000 user USER user WORKDIR /home/user ENV PATH="/home/user/.local/bin:$PATH" # Copy your code and install dependencies COPY --chown=user . . RUN pip install --no-cache-dir --upgrade pip setuptools wheel RUN pip install --no-cache-dir -e . # Create model-store directory inside user's home directory RUN mkdir -p /home/user/torchserve/model-store RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_detector.mar -P /home/user/torchserve/model-store/ RUN wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_pose_estimator.mar -P /home/user/torchserve/model-store/ # Update config.properties if needed, or copy it here: COPY config.properties /home/user/torchserve/config.properties EXPOSE 7860 CMD ["python", "app.py"]