ximilala commited on
Commit
9231f37
·
verified ·
1 Parent(s): 018bfaa

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /app
6
+
7
+ # Copy the requirements file into the container at /app
8
+ COPY requirements.txt .
9
+
10
+ # Install any needed packages specified in requirements.txt
11
+ # Use --no-cache-dir to reduce image size
12
+ # Use --upgrade to ensure latest versions are installed
13
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
+
15
+ # Copy the current directory contents into the container at /app
16
+ COPY main.py .
17
+ COPY models.py .
18
+
19
+ # Make port 8000 available to the world outside this container
20
+ EXPOSE 7860
21
+
22
+ # Define environment variables (placeholders, will be set at runtime)
23
+ ENV NOTION_COOKIE=""
24
+ ENV NOTION_SPACE_ID=""
25
+
26
+ # Run uvicorn when the container launches
27
+ # Use 0.0.0.0 to make it accessible externally
28
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]