Avinashnalla7 commited on
Commit
925fce0
·
1 Parent(s): ea68cfc

fix: dockerize api space (deps + uvicorn entrypoint)

Browse files
Files changed (2) hide show
  1. Dockerfile +5 -2
  2. requirements.txt +1 -1
Dockerfile CHANGED
@@ -1,10 +1,13 @@
1
  FROM python:3.11-slim
2
 
3
  WORKDIR /app
 
 
 
4
  COPY requirements.txt .
5
  RUN pip install --no-cache-dir -r requirements.txt
6
 
7
  COPY . .
8
 
9
- EXPOSE 7860
10
- CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
+ ENV PYTHONUNBUFFERED=1
5
+ ENV PIP_DISABLE_PIP_VERSION_CHECK=1
6
+
7
  COPY requirements.txt .
8
  RUN pip install --no-cache-dir -r requirements.txt
9
 
10
  COPY . .
11
 
12
+ ENV PORT=7860
13
+ CMD ["bash", "-lc", "uvicorn backend.api:app --host 0.0.0.0 --port ${PORT}"]
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
  fastapi
2
- uvicorn[standard]
3
  python-dotenv
4
  paramiko
 
1
  fastapi
2
+ uvicorn
3
  python-dotenv
4
  paramiko