Spaces:
Sleeping
Sleeping
Commit ·
9cbd08e
1
Parent(s): 7ce4b9e
code changes
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
|
@@ -11,14 +11,14 @@ COPY . /app
|
|
| 11 |
RUN pip install --upgrade pip
|
| 12 |
RUN pip install -r requirement.txt
|
| 13 |
|
| 14 |
-
# Expose
|
| 15 |
-
EXPOSE
|
| 16 |
-
EXPOSE 8501
|
| 17 |
|
| 18 |
-
# Ensure logs directory exists
|
| 19 |
RUN mkdir -p /app/logs && chmod -R 777 /app/logs
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
| 23 |
-
|
| 24 |
|
|
|
|
|
|
|
|
|
| 11 |
RUN pip install --upgrade pip
|
| 12 |
RUN pip install -r requirement.txt
|
| 13 |
|
| 14 |
+
# Expose the required port (Hugging Face Spaces uses 7860)
|
| 15 |
+
EXPOSE 7860
|
|
|
|
| 16 |
|
| 17 |
+
# Ensure logs directory exists
|
| 18 |
RUN mkdir -p /app/logs && chmod -R 777 /app/logs
|
| 19 |
|
| 20 |
+
# Install tmux to run multiple processes
|
| 21 |
+
RUN apt-get update && apt-get install -y tmux
|
|
|
|
| 22 |
|
| 23 |
+
# Start FastAPI & Streamlit together using tmux
|
| 24 |
+
CMD ["sh", "-c", "tmux new-session -d -s fastapi 'uvicorn backend.main:app --host 0.0.0.0 --port 7860' && streamlit run Frontend/app.py --server.port 7860 --server.address 0.0.0.0"]
|