GreenBeanzz7 commited on
Commit
c8f78d4
·
verified ·
1 Parent(s): 364e08a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -1,16 +1,21 @@
1
- # Use a lightweight Python image
2
  FROM python:3.10-slim
3
 
4
  # Set working directory
5
  WORKDIR /home/user/app
6
 
7
- # Copy requirements and install
8
  COPY requirements.txt .
 
 
9
  RUN pip install --no-cache-dir --upgrade pip && \
10
- pip install --no-cache-dir -r requirements.txt
 
11
 
12
- # Copy all files into the container
13
  COPY . .
14
 
15
- # Run your Gradio app
 
 
 
16
  CMD ["python", "app.py"]
 
 
1
  FROM python:3.10-slim
2
 
3
  # Set working directory
4
  WORKDIR /home/user/app
5
 
6
+ # Copy requirements first for caching
7
  COPY requirements.txt .
8
+
9
+ # Upgrade pip and install requirements
10
  RUN pip install --no-cache-dir --upgrade pip && \
11
+ pip install --no-cache-dir -r requirements.txt && \
12
+ pip install --upgrade openai
13
 
14
+ # Copy all app files
15
  COPY . .
16
 
17
+ # Expose port
18
+ EXPOSE 7860
19
+
20
+ # Run app
21
  CMD ["python", "app.py"]