Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +5 -9
Dockerfile
CHANGED
|
@@ -11,37 +11,33 @@ ENV OMP_NUM_THREADS=1 \
|
|
| 11 |
HF_DATASETS_CACHE=/home/user/.cache/huggingface/datasets \
|
| 12 |
OFFLOAD_DIR=/home/user/app/offload \
|
| 13 |
MERGED_MODEL_DIR=/home/user/app/merged-model \
|
| 14 |
-
QUANTIZE=
|
| 15 |
USE_ADAPTER_INFERENCE=1 \
|
| 16 |
FORCE_REMERGE=0 \
|
| 17 |
ALLOW_RUNTIME_MERGE=0 \
|
| 18 |
NVIDIA_VISIBLE_DEVICES=all \
|
| 19 |
NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
| 20 |
|
| 21 |
-
#
|
| 22 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 23 |
python3 python3-pip git git-lfs ca-certificates && \
|
| 24 |
rm -rf /var/lib/apt/lists/* && \
|
| 25 |
git lfs install
|
| 26 |
|
| 27 |
-
#
|
| 28 |
RUN python3 -m pip install --upgrade pip
|
| 29 |
RUN python3 -m pip install --no-cache-dir \
|
| 30 |
--index-url https://download.pytorch.org/whl/cu121 \
|
| 31 |
torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1
|
| 32 |
|
| 33 |
-
#
|
| 34 |
-
# (Removing: python3 -m pip install faiss-gpu==1.7.2)
|
| 35 |
-
|
| 36 |
-
# App requirements (single source of truth)
|
| 37 |
COPY requirements.txt .
|
| 38 |
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
| 39 |
|
| 40 |
-
# App code
|
| 41 |
COPY . .
|
| 42 |
|
| 43 |
-
# Needed dirs
|
| 44 |
RUN mkdir -p "$OFFLOAD_DIR" "$MERGED_MODEL_DIR" "$HF_HOME" "$TRANSFORMERS_CACHE"
|
| 45 |
|
| 46 |
EXPOSE 7860
|
| 47 |
CMD ["python3", "app.py"]
|
|
|
|
|
|
| 11 |
HF_DATASETS_CACHE=/home/user/.cache/huggingface/datasets \
|
| 12 |
OFFLOAD_DIR=/home/user/app/offload \
|
| 13 |
MERGED_MODEL_DIR=/home/user/app/merged-model \
|
| 14 |
+
QUANTIZE=none \ # <── default: no quantization
|
| 15 |
USE_ADAPTER_INFERENCE=1 \
|
| 16 |
FORCE_REMERGE=0 \
|
| 17 |
ALLOW_RUNTIME_MERGE=0 \
|
| 18 |
NVIDIA_VISIBLE_DEVICES=all \
|
| 19 |
NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
| 20 |
|
| 21 |
+
# System deps
|
| 22 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 23 |
python3 python3-pip git git-lfs ca-certificates && \
|
| 24 |
rm -rf /var/lib/apt/lists/* && \
|
| 25 |
git lfs install
|
| 26 |
|
| 27 |
+
# Torch stack aligned with transformers 4.44
|
| 28 |
RUN python3 -m pip install --upgrade pip
|
| 29 |
RUN python3 -m pip install --no-cache-dir \
|
| 30 |
--index-url https://download.pytorch.org/whl/cu121 \
|
| 31 |
torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1
|
| 32 |
|
| 33 |
+
# Only CPU FAISS (not GPU)
|
|
|
|
|
|
|
|
|
|
| 34 |
COPY requirements.txt .
|
| 35 |
RUN python3 -m pip install --no-cache-dir -r requirements.txt
|
| 36 |
|
|
|
|
| 37 |
COPY . .
|
| 38 |
|
|
|
|
| 39 |
RUN mkdir -p "$OFFLOAD_DIR" "$MERGED_MODEL_DIR" "$HF_HOME" "$TRANSFORMERS_CACHE"
|
| 40 |
|
| 41 |
EXPOSE 7860
|
| 42 |
CMD ["python3", "app.py"]
|
| 43 |
+
|