YosrAbbassi commited on
Commit
b49078d
1 Parent(s): 9b04d0b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -14
Dockerfile CHANGED
@@ -1,14 +1,11 @@
1
- # Use the official Python image as the base image
2
- FROM python:3.9-slim
3
 
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
7
- # Copy the current directory contents into the container at /app
8
- COPY . /app
9
-
10
- # Install system dependencies required for gradio and fitz
11
- RUN apt-get update && apt-get install -y --no-install-recommends \
12
  libx11-6 \
13
  libxcb1 \
14
  libxext6 \
@@ -16,12 +13,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
16
  libxrandr2 \
17
  libjpeg-dev \
18
  libopenjp2-7-dev \
19
- zlib1g-dev \
20
- && rm -rf /var/lib/apt/lists/*
 
 
21
 
22
- # Install Python dependencies
23
- RUN pip install --upgrade pip
24
- RUN pip install gradio fitz pillow
 
 
25
 
26
- # Run the command to launch your application
27
- CMD ["python", "FINALFINAL.py"]
 
1
+ # Use the official Python image as a parent image
2
+ FROM python:3.8-slim
3
 
4
  # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ # Install system dependencies required by fitz
8
+ RUN apt-get update && apt-get install -y \
 
 
 
9
  libx11-6 \
10
  libxcb1 \
11
  libxext6 \
 
13
  libxrandr2 \
14
  libjpeg-dev \
15
  libopenjp2-7-dev \
16
+ zlib1g-dev
17
+
18
+ # Copy the requirements file into the container at /app
19
+ COPY requirements.txt .
20
 
21
+ # Install any needed packages specified in requirements.txt
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Copy the current directory contents into the container at /app
25
+ COPY . .
26
 
27
+ # Command to run the Python script
28
+ CMD ["python", "app.py"]