srivatsavdamaraju commited on
Commit
0ddf35f
·
verified ·
1 Parent(s): ec87896

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -15
Dockerfile CHANGED
@@ -1,19 +1,13 @@
1
- # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
-
4
- FROM python:3.9
5
-
6
- WORKDIR /code
7
-
8
- COPY ./requirements.txt /code/requirements.txt
9
-
10
- RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
  # Install uvicorn
12
  RUN pip install uvicorn
13
  # Install dependencies
14
  RUN pip install -r requirements.txt
15
-
16
- COPY . .
17
-
18
- ENTRYPOINT ["uvicorn", "app:app"]
19
- CMD ["--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.9-slim
2
+ WORKDIR /app
3
+ COPY requirements.txt ./requirements.txt
4
+ RUN apt-get update \
5
+ && apt-get -y install libpq-dev gcc \
6
+ && pip install psycopg2
 
 
 
 
7
  # Install uvicorn
8
  RUN pip install uvicorn
9
  # Install dependencies
10
  RUN pip install -r requirements.txt
11
+ COPY . /app
12
+ ENTRYPOINT ["uvicorn", "main:app"]
13
+ CMD ["--host", "0.0.0.0", "--port", "7860"]