Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +16 -9
Dockerfile
CHANGED
@@ -1,13 +1,20 @@
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
-
# Install pydantic v1
|
4 |
-
RUN pip install pydantic==1.10.7
|
5 |
|
6 |
-
# Copy your requirements.txt
|
7 |
-
COPY requirements.txt .
|
8 |
-
RUN pip install -r requirements.txt
|
9 |
|
10 |
-
#
|
11 |
-
|
12 |
-
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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"]
|