gauravng commited on
Commit
908cb9c
·
verified ·
1 Parent(s): a00c329

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ # Install dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ chromium \
6
+ chromium-driver \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Set environment variables
10
+ ENV PATH="/usr/lib/chromium:${PATH}"
11
+ ENV PYTHONUNBUFFERED=1
12
+
13
+ # Install Python dependencies
14
+ COPY requirements.txt .
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy the app files
18
+ COPY app.py .
19
+
20
+ # Run FastAPI
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]