Spaces:
Sleeping
Sleeping
Upload Dockerfile
#16
by Spacexpedition - opened
- Dockerfile +3 -18
Dockerfile
CHANGED
|
@@ -1,26 +1,11 @@
|
|
| 1 |
-
# Use an official Python runtime as a parent image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install system dependencies
|
| 8 |
-
RUN apt-get update && apt-get install -y \
|
| 9 |
-
build-essential \
|
| 10 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
-
|
| 12 |
-
# Copy the requirements file
|
| 13 |
-
COPY requirements.txt .
|
| 14 |
-
|
| 15 |
-
# Upgrade pip/setuptools/wheel first, then install the core.
|
| 16 |
-
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
| 17 |
-
pip install --no-cache-dir -r requirements.txt
|
| 18 |
-
|
| 19 |
-
# Copy the rest of the application code
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
-
|
|
|
|
| 23 |
EXPOSE 8000
|
| 24 |
|
| 25 |
-
|
| 26 |
-
CMD ["python", "server.py"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
COPY . .
|
| 6 |
|
| 7 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
+
|
| 9 |
EXPOSE 8000
|
| 10 |
|
| 11 |
+
CMD ["python", "-m", "server.app"]
|
|
|