Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
#
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
libgomp1 \
|
| 6 |
&& rm -rf /var/lib/apt/lists/*
|
|
@@ -8,16 +8,16 @@ RUN apt-get update && apt-get install -y \
|
|
| 8 |
# Set working directory
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
# Copy
|
| 12 |
-
COPY
|
|
|
|
|
|
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
# Copy
|
| 16 |
-
COPY
|
| 17 |
|
| 18 |
-
# Expose port
|
| 19 |
ENV PORT=7860
|
| 20 |
EXPOSE 7860
|
| 21 |
-
|
| 22 |
-
# Run FastAPI app
|
| 23 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Install system dependencies for LightGBM
|
| 4 |
RUN apt-get update && apt-get install -y \
|
| 5 |
libgomp1 \
|
| 6 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
| 8 |
# Set working directory
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
+
# Copy requirements.txt (from root)
|
| 12 |
+
COPY requirements.txt .
|
| 13 |
+
|
| 14 |
+
# Install Python dependencies
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
+
# Copy all app code
|
| 18 |
+
COPY . .
|
| 19 |
|
| 20 |
+
# Expose port and run app
|
| 21 |
ENV PORT=7860
|
| 22 |
EXPOSE 7860
|
|
|
|
|
|
|
| 23 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|