Update Dockerfile
Browse files- Dockerfile +1 -7
Dockerfile
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
# Use Python 3.10 for maximum compatibility with pre-built wheels
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
@@ -9,7 +8,6 @@ ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
| 9 |
HF_HUB_ENABLE_HF_TRANSFER=1 \
|
| 10 |
TOKENIZERS_PARALLELISM=false
|
| 11 |
|
| 12 |
-
# Install system dependencies (including OpenBLAS for performance)
|
| 13 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 14 |
gcc g++ make cmake git \
|
| 15 |
libopenblas-dev \
|
|
@@ -17,18 +15,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 17 |
|
| 18 |
WORKDIR /app
|
| 19 |
|
| 20 |
-
# -
|
| 21 |
-
# This wheel includes OpenBLAS and LFM2 MoE support, installing in seconds!
|
| 22 |
RUN pip install --no-cache-dir \
|
| 23 |
https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.22-cp310-cp310-linux_x86_64.whl
|
| 24 |
|
| 25 |
-
# Copy and install the rest of your dependencies
|
| 26 |
COPY requirements.txt .
|
| 27 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 28 |
|
| 29 |
-
# Copy your application code
|
| 30 |
COPY . .
|
| 31 |
|
| 32 |
-
# Expose the port and run Uvicorn
|
| 33 |
EXPOSE 7860
|
| 34 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
|
|
| 8 |
HF_HUB_ENABLE_HF_TRANSFER=1 \
|
| 9 |
TOKENIZERS_PARALLELISM=false
|
| 10 |
|
|
|
|
| 11 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 12 |
gcc g++ make cmake git \
|
| 13 |
libopenblas-dev \
|
|
|
|
| 15 |
|
| 16 |
WORKDIR /app
|
| 17 |
|
| 18 |
+
# Pre-built llama-cpp-python wheel with OpenBLAS
|
|
|
|
| 19 |
RUN pip install --no-cache-dir \
|
| 20 |
https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.22-cp310-cp310-linux_x86_64.whl
|
| 21 |
|
|
|
|
| 22 |
COPY requirements.txt .
|
| 23 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 24 |
|
|
|
|
| 25 |
COPY . .
|
| 26 |
|
|
|
|
| 27 |
EXPOSE 7860
|
| 28 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|