Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +2 -5
Dockerfile
CHANGED
|
@@ -2,23 +2,20 @@ FROM python:3.10-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install g++ and build tools first
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
g++ \
|
| 8 |
build-essential \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
# Downgrade pip FIRST before anything else
|
| 12 |
RUN pip install "pip<24.1"
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
RUN pip install torch --index-url https://download.pytorch.org/whl/cpu
|
| 16 |
RUN pip install omegaconf==2.0.6 --no-deps
|
| 17 |
RUN pip install hydra-core==1.0.7 --no-deps
|
| 18 |
RUN pip install fairseq==0.12.2
|
| 19 |
RUN pip install gradio numpy bitarray sacrebleu sentencepiece
|
| 20 |
|
| 21 |
-
# Copy all your files
|
| 22 |
COPY . .
|
| 23 |
|
| 24 |
EXPOSE 7860
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
g++ \
|
| 7 |
build-essential \
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
|
|
|
| 10 |
RUN pip install "pip<24.1"
|
| 11 |
|
| 12 |
+
# Pin torch to 2.0.1 to avoid weights_only=True breaking fairseq checkpoints
|
| 13 |
+
RUN pip install torch==2.0.1 --index-url https://download.pytorch.org/whl/cpu
|
| 14 |
RUN pip install omegaconf==2.0.6 --no-deps
|
| 15 |
RUN pip install hydra-core==1.0.7 --no-deps
|
| 16 |
RUN pip install fairseq==0.12.2
|
| 17 |
RUN pip install gradio numpy bitarray sacrebleu sentencepiece
|
| 18 |
|
|
|
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
EXPOSE 7860
|