Spaces:
Sleeping
Sleeping
Commit
·
9e8f23e
1
Parent(s):
2108804
change docker3
Browse files- Dockerfile +8 -10
Dockerfile
CHANGED
@@ -1,27 +1,25 @@
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
-
# Add ~/.local/bin to PATH for script access
|
4 |
-
ENV PATH="/root/.local/bin:$PATH"
|
5 |
-
ENV PYTHONDONTWRITEBYTECODE=1
|
6 |
-
ENV PYTHONUNBUFFERED=1
|
7 |
-
|
8 |
# Set working directory
|
9 |
WORKDIR /app
|
10 |
|
11 |
-
# Copy files
|
12 |
COPY . .
|
13 |
|
14 |
-
# Install Python dependencies
|
15 |
-
RUN pip install --
|
16 |
-
|
|
|
|
|
17 |
|
18 |
# Expose FastAPI and Streamlit ports
|
19 |
EXPOSE 8000
|
20 |
EXPOSE 8501
|
21 |
|
22 |
-
# Run
|
23 |
CMD uvicorn streamlit_app.main_api:app --host 0.0.0.0 --port 8000 & \
|
24 |
streamlit run streamlit_app/app.py --server.port 8501
|
25 |
|
26 |
|
27 |
|
|
|
|
1 |
FROM python:3.10-slim
|
2 |
|
|
|
|
|
|
|
|
|
|
|
3 |
# Set working directory
|
4 |
WORKDIR /app
|
5 |
|
6 |
+
# Copy all project files
|
7 |
COPY . .
|
8 |
|
9 |
+
# Install Python dependencies system-wide
|
10 |
+
RUN pip install --upgrade pip && pip install -r requirement.txt
|
11 |
+
|
12 |
+
# Create ChromaDB persistence directory
|
13 |
+
RUN mkdir -p /app/data_ingetion/chroma_storage
|
14 |
|
15 |
# Expose FastAPI and Streamlit ports
|
16 |
EXPOSE 8000
|
17 |
EXPOSE 8501
|
18 |
|
19 |
+
# Run FastAPI then Streamlit
|
20 |
CMD uvicorn streamlit_app.main_api:app --host 0.0.0.0 --port 8000 & \
|
21 |
streamlit run streamlit_app/app.py --server.port 8501
|
22 |
|
23 |
|
24 |
|
25 |
+
|