SeedOfEvil commited on
Commit
156a829
·
verified ·
1 Parent(s): 86a4568

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 variables to avoid buffering issues
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 requirements.txt and install dependencies
14
  COPY requirements.txt .
15
- RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # Copy the application code
18
  COPY app.py .
19
 
20
- # Expose the default Gradio port
21
  EXPOSE 7860
22
 
23
- # Command to run the app
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"]