FROM pytorch/pytorch:latest RUN apt update && apt install -y && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN python3 -m pip install -r requirements.txt COPY setup.py VERSION . COPY src ./src RUN python3 -m pip install . COPY "demo.py" . EXPOSE 7860 8080 COPY start.sh . RUN chmod +x start.sh RUN chmod 777 /workspace RUN mkdir -p /workspace/.cache/huggingface/hub ENV TRANSFORMERS_CACHE=/workspace/.cache/huggingface/hub CMD ["./start.sh"]