Rakshitjan commited on
Commit
05fb827
·
verified ·
1 Parent(s): 21037c7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -22
Dockerfile CHANGED
@@ -22,30 +22,16 @@
22
  # # CMD ["python", "app.py"]
23
 
24
 
25
- # FROM python:3.9
26
 
27
- # RUN useradd -m -u 1000 user
28
- # USER user
29
- # ENV PATH="/home/user/.local/bin:$PATH"
30
-
31
- # WORKDIR /app
32
-
33
- # COPY --chown=user ./requirements.txt requirements.txt
34
- # RUN pip install --no-cache-dir --upgrade -r requirements.txt
35
-
36
- # COPY --chown=user . /app
37
- # CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
38
-
39
- FROM python:3.9-slim
40
 
41
  WORKDIR /app
42
 
43
- COPY requirements.txt .
44
- RUN pip install --no-cache-dir -r requirements.txt
45
-
46
- COPY . .
47
-
48
- ENV PORT=8000
49
- ENV OPENAI_API_KEY=${OPENAI_API_KEY}
50
 
51
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "${PORT}"]
 
 
22
  # # CMD ["python", "app.py"]
23
 
24
 
25
+ FROM python:3.9
26
 
27
+ RUN useradd -m -u 1000 user
28
+ USER user
29
+ ENV PATH="/home/user/.local/bin:$PATH"
 
 
 
 
 
 
 
 
 
 
30
 
31
  WORKDIR /app
32
 
33
+ COPY --chown=user ./requirements.txt requirements.txt
34
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
 
 
 
 
35
 
36
+ COPY --chown=user . /app
37
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]