Rakshitjan commited on
Commit
491cbe3
·
verified ·
1 Parent(s): 39fdb35

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +38 -24
Dockerfile CHANGED
@@ -1,37 +1,51 @@
1
- # FROM python:3.9-slim
2
 
3
- # WORKDIR /app
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
- # # Install system dependencies
6
- # RUN apt-get update && apt-get install -y \
7
- # build-essential \
8
- # && rm -rf /var/lib/apt/lists/*
9
 
10
- # # Copy and install requirements
11
- # COPY requirements.txt .
12
- # RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # # Copy application files
15
- # COPY . .
16
 
17
- # # Expose ports for both FastAPI and Gradio
18
- # EXPOSE 7860
19
- # EXPOSE 8000
20
 
21
- # # Run the combined application
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"]
 
1
+ # # FROM python:3.9-slim
2
 
3
+ # # WORKDIR /app
4
+
5
+ # # # Install system dependencies
6
+ # # RUN apt-get update && apt-get install -y \
7
+ # # build-essential \
8
+ # # && rm -rf /var/lib/apt/lists/*
9
+
10
+ # # # Copy and install requirements
11
+ # # COPY requirements.txt .
12
+ # # RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # # # Copy application files
15
+ # # COPY . .
16
 
17
+ # # # Expose ports for both FastAPI and Gradio
18
+ # # EXPOSE 7860
19
+ # # EXPOSE 8000
 
20
 
21
+ # # # Run the combined application
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}"]