narendrasinghd commited on
Commit
5160eab
·
verified ·
1 Parent(s): 69554f2

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -8
Dockerfile CHANGED
@@ -1,14 +1,18 @@
1
- FROM python:3.12
 
2
 
3
- WORKDIR /code
4
-
5
- COPY ./requirements.txt /code/requirements.txt
6
-
7
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
 
9
  COPY . .
10
 
11
- EXPOSE 7860
 
 
 
 
 
12
 
13
- #CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
14
  CMD ["gunicorn", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "app:app", "--bind", "0.0.0.0:7860"]
 
1
+ # Use a base image with Python
2
+ FROM python:3.10
3
 
4
+ # Set the working directory
5
+ WORKDIR /app
 
 
 
6
 
7
+ # Copy the app files
8
  COPY . .
9
 
10
+ # Install dependencies
11
+ RUN pip install --no-cache-dir --upgrade pip && \
12
+ pip install -r requirements.txt
13
+
14
+ # Install Gunicorn (if not in requirements.txt)
15
+ RUN pip install gunicorn uvicorn
16
 
17
+ # Run the app with multiple workers
18
  CMD ["gunicorn", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "app:app", "--bind", "0.0.0.0:7860"]