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 mkdir /data ENV TRANSFORMERS_CACHE=/data CMD ["./start.sh"]