Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +11 -6
Dockerfile
CHANGED
|
@@ -1,23 +1,28 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
# Install
|
| 4 |
-
RUN apt-get update && apt-get install -y
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
-
# Upgrade pip
|
| 9 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 10 |
|
| 11 |
-
# Install llama-cpp-python
|
| 12 |
RUN pip install --no-cache-dir llama-cpp-python \
|
| 13 |
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 14 |
|
| 15 |
-
# Install
|
| 16 |
RUN pip install --no-cache-dir flask requests huggingface-hub
|
| 17 |
|
| 18 |
-
# Copy your app
|
| 19 |
COPY . .
|
| 20 |
|
|
|
|
| 21 |
EXPOSE 7860
|
| 22 |
ENV PYTHONUNBUFFERED=1
|
| 23 |
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Install system dependencies including compiler
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
build-essential \
|
| 6 |
+
cmake \
|
| 7 |
+
libgomp1 \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
+
# Upgrade pip + setuptools + wheel
|
| 13 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 14 |
|
| 15 |
+
# Install llama-cpp-python (CPU prebuilt if available, else build from source)
|
| 16 |
RUN pip install --no-cache-dir llama-cpp-python \
|
| 17 |
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 18 |
|
| 19 |
+
# Install Flask + Hugging Face tools
|
| 20 |
RUN pip install --no-cache-dir flask requests huggingface-hub
|
| 21 |
|
| 22 |
+
# Copy your app code
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
+
# Expose port
|
| 26 |
EXPOSE 7860
|
| 27 |
ENV PYTHONUNBUFFERED=1
|
| 28 |
|