Kiran5 commited on
Commit
f139a57
·
1 Parent(s): 9815ad1

Add application file

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -4,7 +4,11 @@ RUN useradd -m -u 1000 user
4
  USER user
5
  ENV PATH="/home/user/.local/bin:$PATH"
6
 
7
- COPY . .
 
 
 
 
8
 
9
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
10
 
@@ -12,5 +16,5 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
12
  EXPOSE 7860
13
 
14
  # CMD to run the FastAPI app with Uvicorn
15
- CMD ["sh", "-c", "python main.py"]
16
 
 
4
  USER user
5
  ENV PATH="/home/user/.local/bin:$PATH"
6
 
7
+ WORKDIR /app
8
+
9
+ COPY --chown=user ./requirements.txt requirements.txt
10
+
11
+ COPY --chown=user . /app
12
 
13
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
 
16
  EXPOSE 7860
17
 
18
  # CMD to run the FastAPI app with Uvicorn
19
+ CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "7860"]
20