Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
# Use an official PyTorch GPU-enabled image (with CUDA 11.7 and cuDNN8)
|
2 |
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
|
3 |
|
4 |
-
# Set environment
|
5 |
ENV PYTHONUNBUFFERED=1
|
6 |
|
7 |
# Install system dependencies
|
@@ -10,15 +10,15 @@ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
|
10 |
# Set the working directory
|
11 |
WORKDIR /app
|
12 |
|
13 |
-
# Copy
|
14 |
COPY requirements.txt .
|
15 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
|
17 |
-
# Copy
|
18 |
COPY app.py .
|
19 |
|
20 |
-
# Expose
|
21 |
EXPOSE 7860
|
22 |
|
23 |
-
#
|
24 |
CMD ["python", "app.py"]
|
|
|
1 |
# Use an official PyTorch GPU-enabled image (with CUDA 11.7 and cuDNN8)
|
2 |
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
|
3 |
|
4 |
+
# Set environment variable for unbuffered output
|
5 |
ENV PYTHONUNBUFFERED=1
|
6 |
|
7 |
# Install system dependencies
|
|
|
10 |
# Set the working directory
|
11 |
WORKDIR /app
|
12 |
|
13 |
+
# Copy and install Python dependencies from requirements.txt
|
14 |
COPY requirements.txt .
|
15 |
+
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
|
16 |
|
17 |
+
# Copy application code
|
18 |
COPY app.py .
|
19 |
|
20 |
+
# Expose Gradio default port
|
21 |
EXPOSE 7860
|
22 |
|
23 |
+
# Run the app
|
24 |
CMD ["python", "app.py"]
|