Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
|
@@ -6,18 +6,18 @@ WORKDIR /app
|
|
| 6 |
# Copy the necessary files
|
| 7 |
COPY server.py requirements.txt ./
|
| 8 |
|
| 9 |
-
# Install system dependencies
|
| 10 |
-
RUN apt-get update && apt-get install -y build-essential \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
-
# Upgrade pip and
|
| 14 |
-
RUN pip install --upgrade pip setuptools
|
| 15 |
|
| 16 |
# Install dependencies
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
-
# Expose port
|
| 20 |
-
EXPOSE
|
| 21 |
|
| 22 |
# Run the application
|
| 23 |
CMD ["python", "server.py"]
|
|
|
|
| 6 |
# Copy the necessary files
|
| 7 |
COPY server.py requirements.txt ./
|
| 8 |
|
| 9 |
+
# Install system dependencies required for Python packages
|
| 10 |
+
RUN apt-get update && apt-get install -y build-essential libffi-dev libssl-dev \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
+
# Upgrade pip, setuptools, and wheel before installing dependencies
|
| 14 |
+
RUN pip install --upgrade pip setuptools wheel
|
| 15 |
|
| 16 |
# Install dependencies
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
+
# Expose port 7860 (Hugging Face Spaces expects this)
|
| 20 |
+
EXPOSE 7860
|
| 21 |
|
| 22 |
# Run the application
|
| 23 |
CMD ["python", "server.py"]
|