Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +25 -7
Dockerfile
CHANGED
@@ -1,14 +1,32 @@
|
|
1 |
-
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
RUN apt-get update && apt-get install -y \
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
7 |
|
|
|
8 |
WORKDIR /app
|
|
|
|
|
9 |
COPY requirements.txt .
|
10 |
-
RUN pip install -r requirements.txt
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
-
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.enableCORS=false"]
|
|
|
1 |
+
# Use the official slim Python base image
|
2 |
+
FROM python:3.10-slim
|
3 |
|
4 |
+
# Set environment variables to avoid prompts during install
|
5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
6 |
+
|
7 |
+
# Install system dependencies
|
8 |
RUN apt-get update && apt-get install -y \
|
9 |
+
build-essential \
|
10 |
+
gcc \
|
11 |
+
libffi-dev \
|
12 |
+
libpq-dev \
|
13 |
+
libssl-dev \
|
14 |
+
curl \
|
15 |
+
&& apt-get clean \
|
16 |
+
&& rm -rf /var/lib/apt/lists/*
|
17 |
|
18 |
+
# Set the working directory
|
19 |
WORKDIR /app
|
20 |
+
|
21 |
+
# Copy requirements file if you have one
|
22 |
COPY requirements.txt .
|
|
|
23 |
|
24 |
+
# Install Python dependencies
|
25 |
+
RUN pip install --upgrade pip && pip install -r requirements.txt
|
26 |
+
|
27 |
+
# Copy the rest of your application
|
28 |
+
COPY . .
|
29 |
+
|
30 |
+
# Set the default command to run your app (adjust if needed)
|
31 |
+
CMD ["python", "app.py"]
|
32 |
|
|