Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -5
Dockerfile
CHANGED
|
@@ -1,16 +1,15 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
# Set environment variables
|
| 4 |
ENV PYTHONUNBUFFERED=1
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
ENV HF_HOME=/app/cache
|
|
|
|
| 7 |
|
| 8 |
# Install system dependencies
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
-
python3 \
|
| 11 |
-
python3-pip \
|
| 12 |
-
python3-venv \
|
| 13 |
git \
|
|
|
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
# Set working directory
|
|
@@ -20,7 +19,7 @@ WORKDIR /app
|
|
| 20 |
COPY requirements.txt .
|
| 21 |
|
| 22 |
# Install Python dependencies
|
| 23 |
-
RUN
|
| 24 |
|
| 25 |
# Copy application code
|
| 26 |
COPY . .
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
|
| 3 |
# Set environment variables
|
| 4 |
ENV PYTHONUNBUFFERED=1
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 6 |
ENV HF_HOME=/app/cache
|
| 7 |
+
ENV CUDA_VISIBLE_DEVICES=-1
|
| 8 |
|
| 9 |
# Install system dependencies
|
| 10 |
RUN apt-get update && apt-get install -y \
|
|
|
|
|
|
|
|
|
|
| 11 |
git \
|
| 12 |
+
curl \
|
| 13 |
&& rm -rf /var/lib/apt/lists/*
|
| 14 |
|
| 15 |
# Set working directory
|
|
|
|
| 19 |
COPY requirements.txt .
|
| 20 |
|
| 21 |
# Install Python dependencies
|
| 22 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
# Copy application code
|
| 25 |
COPY . .
|