FROM python:3.10-slim WORKDIR /app RUN apt-get update && apt-get install -y \ g++ \ build-essential \ && rm -rf /var/lib/apt/lists/* RUN pip install "pip<24.1" # Pin torch to 2.0.1 to avoid weights_only=True breaking fairseq checkpoints RUN pip install torch==2.0.1 --index-url https://download.pytorch.org/whl/cpu RUN pip install omegaconf==2.0.6 --no-deps RUN pip install hydra-core==1.0.7 --no-deps RUN pip install fairseq==0.12.2 RUN pip install gradio numpy bitarray sacrebleu sentencepiece COPY . . EXPOSE 7860 CMD ["python", "app.py"]