Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -12
Dockerfile
CHANGED
|
@@ -1,28 +1,20 @@
|
|
| 1 |
-
# Go back to a stable, general Python image
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
# Install necessary system packages (
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
curl \
|
| 9 |
git \
|
| 10 |
build-essential \
|
| 11 |
-
libffi-dev \
|
| 12 |
-
libssl-dev \
|
| 13 |
-
# Clean up
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
-
#
|
| 17 |
-
# This is the dedicated fix for the ValueError you keep seeing
|
| 18 |
-
RUN pip install --no-cache-dir sentencepiece && \
|
| 19 |
-
pip install --no-cache-dir transformers
|
| 20 |
-
|
| 21 |
-
# 2. Install remaining dependencies (torch, etc.)
|
| 22 |
COPY requirements.txt ./
|
| 23 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 24 |
|
| 25 |
-
# Copy application source code
|
| 26 |
COPY src/ ./src/
|
| 27 |
|
| 28 |
EXPOSE 8501
|
|
|
|
| 1 |
+
# Go back to a stable, general Python image
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Install necessary system packages (simpler now)
|
| 7 |
RUN apt-get update && apt-get install -y \
|
| 8 |
curl \
|
| 9 |
git \
|
| 10 |
build-essential \
|
|
|
|
|
|
|
|
|
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
+
# Install all dependencies (now without the problematic sentencepiece)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
COPY requirements.txt ./
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
+
# Copy application source code
|
| 18 |
COPY src/ ./src/
|
| 19 |
|
| 20 |
EXPOSE 8501
|