Zoro-147 commited on
Commit
c685ab9
·
verified ·
1 Parent(s): 90a892c

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim-buster
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies required for PyPDF2 and other libraries
8
+ RUN apt-get update && apt-get install -y \
9
+ libgl1-mesa-glx \
10
+ libgirepository1.0-dev \
11
+ libcairo2-dev \
12
+ pkg-config \
13
+ python3-dev \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Copy the requirements file into the container at /app
17
+ COPY requirements.txt .
18
+
19
+ # Install any needed packages specified in requirements.txt
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Copy the rest of the application code into the container
23
+ COPY . .
24
+
25
+ # Make port 7860 available to the world outside this container
26
+ EXPOSE 7860
27
+
28
+ # Run the application
29
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
30
+