Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +5 -1
Dockerfile
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
# Use official Python image
|
2 |
FROM python:3.12-slim
|
3 |
|
|
|
|
|
|
|
|
|
4 |
# Set up a new user to avoid permission issues
|
5 |
RUN useradd -m -u 1000 user
|
6 |
USER user
|
@@ -17,7 +21,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
17 |
# Copy app code
|
18 |
COPY --chown=user . .
|
19 |
|
20 |
-
# Expose the app on port 7860
|
21 |
EXPOSE 7860
|
22 |
|
23 |
# Command to run the app
|
|
|
1 |
# Use official Python image
|
2 |
FROM python:3.12-slim
|
3 |
|
4 |
+
# Install system dependencies for pandas and other packages
|
5 |
+
RUN apt-get update && \
|
6 |
+
apt-get install -y gcc g++ libpq-dev python3-dev libffi-dev build-essential
|
7 |
+
|
8 |
# Set up a new user to avoid permission issues
|
9 |
RUN useradd -m -u 1000 user
|
10 |
USER user
|
|
|
21 |
# Copy app code
|
22 |
COPY --chown=user . .
|
23 |
|
24 |
+
# Expose the app on port 7860
|
25 |
EXPOSE 7860
|
26 |
|
27 |
# Command to run the app
|