mgbam commited on
Commit
12d6cc5
·
verified ·
1 Parent(s): d4dfe66

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -9
Dockerfile CHANGED
@@ -1,13 +1,20 @@
1
  FROM python:3.10-slim
2
 
3
- # Install pydantic v1 first
4
- RUN pip install pydantic==1.10.7
5
 
6
- # Copy your requirements.txt and install remaining dependencies
7
- COPY requirements.txt .
8
- RUN pip install -r requirements.txt
9
 
10
- # Copy the rest of your app
11
- COPY . /app
12
- WORKDIR /app
13
- CMD ["streamlit", "run", "app.py"]
 
 
 
 
 
 
 
 
 
1
  FROM python:3.10-slim
2
 
3
+ # 1. Install pydantic v1 before anything else
4
+ RUN pip install --no-cache-dir pydantic==1.10.7
5
 
6
+ # 2. Copy your requirements.txt
7
+ COPY requirements.txt /tmp/requirements.txt
 
8
 
9
+ # 3. Install the rest of your dependencies
10
+ RUN pip install --no-cache-dir -r /tmp/requirements.txt
11
+
12
+ # 4. Copy your app code
13
+ COPY . /home/user/app
14
+ WORKDIR /home/user/app
15
+
16
+ # 5. Expose streamlit or gradio or whichever port your app uses
17
+ EXPOSE 7860
18
+
19
+ # 6. Run your app
20
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]