Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +19 -19
Dockerfile
CHANGED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
-
|
| 3 |
-
# Set the working directory in the container
|
| 4 |
-
WORKDIR /app
|
| 5 |
-
|
| 6 |
-
# Copy the requirements file into the container
|
| 7 |
-
COPY requirements.txt /app/requirements.txt
|
| 8 |
-
|
| 9 |
-
# Install dependencies
|
| 10 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
-
|
| 12 |
-
# Copy the application code into the container
|
| 13 |
-
COPY . /app
|
| 14 |
-
|
| 15 |
-
# Expose ports for FastAPI and Streamlit
|
| 16 |
-
EXPOSE 8000 8501
|
| 17 |
-
|
| 18 |
-
# Command to run both FastAPI and Streamlit
|
| 19 |
-
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port 8000 & streamlit run frontend.py --server.port 8501 --server.address 0.0.0.0"]
|
|
|
|
| 1 |
+
FROM python:3.12.7-slim
|
| 2 |
+
|
| 3 |
+
# Set the working directory in the container
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
|
| 6 |
+
# Copy the requirements file into the container
|
| 7 |
+
COPY requirements.txt /app/requirements.txt
|
| 8 |
+
|
| 9 |
+
# Install dependencies
|
| 10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
+
|
| 12 |
+
# Copy the application code into the container
|
| 13 |
+
COPY . /app
|
| 14 |
+
|
| 15 |
+
# Expose ports for FastAPI and Streamlit
|
| 16 |
+
EXPOSE 8000 8501
|
| 17 |
+
|
| 18 |
+
# Command to run both FastAPI and Streamlit
|
| 19 |
+
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port 8000 & streamlit run frontend.py --server.port 8501 --server.address 0.0.0.0"]
|