Dockerfile 720 B

12345678910111213141516171819202122232425262728293031323334
  1. FROM pytorch/pytorch:latest
  2. WORKDIR /app
  3. RUN apt-get update
  4. RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
  5. # Assume root to install required dependencies
  6. RUN apt-get install -y git g++ ffmpeg libsm6 libxext6 libvulkan-dev
  7. # Install pip dependencies
  8. COPY requirements.txt /app/requirements.txt
  9. RUN pip install -r /app/requirements.txt
  10. RUN pip install torchvision --force-reinstall
  11. RUN pip install "numpy<2.0"
  12. RUN apt-get remove -y g++ && \
  13. apt-get autoremove -y
  14. # Copy app
  15. COPY . /app
  16. # Prepare models
  17. RUN python -u docker_prepare.py
  18. RUN rm -rf /tmp
  19. # Add /app to Python module path
  20. ENV PYTHONPATH="${PYTHONPATH}:/app"
  21. WORKDIR /app
  22. ENTRYPOINT ["python", "-m", "manga_translator"]