Kastg commited on
Commit
153182e
·
verified ·
1 Parent(s): d287b21

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.9
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE 1
6
+ ENV PYTHONUNBUFFERED 1
7
+
8
+ # Set the working directory in the container
9
+ WORKDIR /app
10
+
11
+ # Copy the requirements file into the container at /app
12
+ COPY requirements.txt /app/
13
+
14
+ # Install any needed packages specified in requirements.txt
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy the rest of the application code into the container
18
+ COPY . /app/
19
+
20
+ # Expose the port the app runs on
21
+ EXPOSE 8000
22
+
23
+ # Command to run the application
24
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]