Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +24 -3
Dockerfile
CHANGED
|
@@ -1,6 +1,27 @@
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
EXPOSE 7860
|
|
|
|
| 6 |
CMD ["uvicorn", "agent_server:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
+
|
| 3 |
+
# Install system dependencies (only what’s needed for pip + BigQuery client)
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
gcc \
|
| 6 |
+
libpq-dev \
|
| 7 |
+
curl \
|
| 8 |
+
ca-certificates \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
+
# Set working directory
|
| 12 |
+
WORKDIR /workspace
|
| 13 |
+
|
| 14 |
+
# Copy requirements first (better Docker caching)
|
| 15 |
+
COPY requirements.txt .
|
| 16 |
+
|
| 17 |
+
# Install Python dependencies
|
| 18 |
+
RUN pip install --upgrade pip && \
|
| 19 |
+
pip install --no-cache-dir -r requirements.txt
|
| 20 |
+
|
| 21 |
+
# Copy the rest of the code
|
| 22 |
+
COPY . /workspace
|
| 23 |
+
|
| 24 |
+
# Expose FastAPI port (if using API mode)
|
| 25 |
EXPOSE 7860
|
| 26 |
+
|
| 27 |
CMD ["uvicorn", "agent_server:app", "--host", "0.0.0.0", "--port", "7860"]
|