Spaces:
Sleeping
Sleeping
Upload 8 files
Browse files- Dockerfile +9 -8
Dockerfile
CHANGED
|
@@ -5,21 +5,22 @@ ENV DEBIAN_FRONTEND=noninteractive \
|
|
| 5 |
PIP_NO_CACHE_DIR=1 \
|
| 6 |
PORT=7860
|
| 7 |
|
| 8 |
-
# System deps and Python 3.
|
| 9 |
-
|
| 10 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
-
software-properties-common \
|
| 12 |
ca-certificates \
|
| 13 |
curl \
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
| 17 |
WORKDIR /app
|
| 18 |
|
| 19 |
# Copy only requirements first for better layer caching
|
| 20 |
COPY requirements.txt /app/requirements.txt
|
| 21 |
-
RUN python3
|
| 22 |
-
&& python3
|
| 23 |
|
| 24 |
# Copy source
|
| 25 |
COPY . /app
|
|
|
|
| 5 |
PIP_NO_CACHE_DIR=1 \
|
| 6 |
PORT=7860
|
| 7 |
|
| 8 |
+
# System deps and Python (Ubuntu 22.04 provides Python 3.10)
|
|
|
|
| 9 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
| 10 |
ca-certificates \
|
| 11 |
curl \
|
| 12 |
+
python3 \
|
| 13 |
+
python3-pip \
|
| 14 |
+
python3-venv \
|
| 15 |
+
&& update-ca-certificates \
|
| 16 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
+
|
| 18 |
WORKDIR /app
|
| 19 |
|
| 20 |
# Copy only requirements first for better layer caching
|
| 21 |
COPY requirements.txt /app/requirements.txt
|
| 22 |
+
RUN python3 -m pip install --upgrade pip \
|
| 23 |
+
&& python3 -m pip install -r /app/requirements.txt
|
| 24 |
|
| 25 |
# Copy source
|
| 26 |
COPY . /app
|