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