shiue2000 commited on
Commit
6c277f1
·
verified ·
1 Parent(s): 2e2bceb

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -18
Dockerfile CHANGED
@@ -1,32 +1,39 @@
1
- # Use an official Python runtime as the base image
 
2
  FROM python:3.9-slim
3
 
4
- # Set working directory
 
5
  WORKDIR /app
6
 
7
- # Set environment variables
8
- ENV PYTHONUNBUFFERED=1
9
- ENV PYTHONDONTWRITEBYTECODE=1
 
 
 
 
 
 
 
 
10
 
11
- # Install system dependencies
12
- RUN apt-get update && apt-get install -y \
13
- build-essential \
14
- libatlas-base-dev \
15
- gfortran \
16
- && rm -rf /var/lib/apt/lists/*
17
 
18
- # Copy requirements file
19
  COPY requirements.txt .
20
 
21
- # Install Python dependencies
22
- RUN pip install --upgrade pip
23
- RUN pip install -r requirements.txt
 
 
24
 
25
- # Copy the application code
26
  COPY . .
27
 
28
- # Expose the port Gradio uses (default is 7860)
 
29
  EXPOSE 7860
30
 
31
- # Run the application
 
32
  CMD ["python", "app.py"]
 
1
+ Use an official Python runtime as the base image
2
+
3
  FROM python:3.9-slim
4
 
5
+ Set working directory
6
+
7
  WORKDIR /app
8
 
9
+ Set environment variables
10
+
11
+ ENV PYTHONUNBUFFERED=1 ENV PYTHONDONTWRITEBYTECODE=1
12
+
13
+ Install system dependencies
14
+
15
+ RUN apt-get update && apt-get install -y
16
+ build-essential
17
+ libatlas-base-dev
18
+ gfortran
19
+ && rm -rf /var/lib/apt/lists/*
20
 
21
+ Copy requirements file
 
 
 
 
 
22
 
 
23
  COPY requirements.txt .
24
 
25
+ Install Python dependencies
26
+
27
+ RUN pip install --upgrade pip RUN pip install -r requirements.txt
28
+
29
+ Copy the application code
30
 
 
31
  COPY . .
32
 
33
+ Expose the port Gradio uses (default is 7860)
34
+
35
  EXPOSE 7860
36
 
37
+ Run the application
38
+
39
  CMD ["python", "app.py"]