Spaces:
Sleeping
Sleeping
modified dockerfile
Browse files
dockerfile
CHANGED
@@ -1,28 +1,3 @@
|
|
1 |
-
# # Use official Python image
|
2 |
-
# FROM python:3.9
|
3 |
-
|
4 |
-
# # Create a non-root user for security
|
5 |
-
# RUN useradd -m -u 1000 user
|
6 |
-
# USER user
|
7 |
-
|
8 |
-
# # Set environment variables
|
9 |
-
# ENV PATH="/home/user/.local/bin:$PATH"
|
10 |
-
|
11 |
-
# # Set working directory
|
12 |
-
# WORKDIR /app
|
13 |
-
|
14 |
-
# # Copy dependency file first (for better caching)
|
15 |
-
# COPY --chown=user requirements.txt /app/requirements.txt
|
16 |
-
|
17 |
-
# # Install dependencies
|
18 |
-
# RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
19 |
-
|
20 |
-
# # Copy the rest of the application code
|
21 |
-
# COPY --chown=user . /app
|
22 |
-
|
23 |
-
# # Expose the port used by the application
|
24 |
-
# EXPOSE 7860
|
25 |
-
|
26 |
FROM python:3.11
|
27 |
|
28 |
WORKDIR /app
|
@@ -37,8 +12,12 @@ EXPOSE 7860
|
|
37 |
# Ensure logs directory exists
|
38 |
RUN mkdir -p /app/logs && chmod -R 777 /app/logs
|
39 |
|
|
|
|
|
|
|
|
|
40 |
ENV PYTHONPATH="/app/src"
|
41 |
|
42 |
-
#
|
43 |
-
|
44 |
-
CMD ["sh", "-c", "fastapi dev src/backend/main.py --host 0.0.0.0 --port 8000"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM python:3.11
|
2 |
|
3 |
WORKDIR /app
|
|
|
12 |
# Ensure logs directory exists
|
13 |
RUN mkdir -p /app/logs && chmod -R 777 /app/logs
|
14 |
|
15 |
+
# Install tmux to run multiple processes
|
16 |
+
RUN apt-get update && apt-get install -y tmux
|
17 |
+
|
18 |
+
# Set Python path
|
19 |
ENV PYTHONPATH="/app/src"
|
20 |
|
21 |
+
# Start FastAPI & Streamlit together using tmux
|
22 |
+
|
23 |
+
CMD ["sh", "-c", "fastapi dev src/backend/main.py --host 0.0.0.0 --port 8000 & sleep 5 && streamlit run src/frontend/home.py --server.port 7860 --server.address 0.0.0.0"]
|
src/backend/__pycache__/main.cpython-313.pyc
CHANGED
Binary files a/src/backend/__pycache__/main.cpython-313.pyc and b/src/backend/__pycache__/main.cpython-313.pyc differ
|
|
src/backend/__pycache__/trending_videos_page.cpython-313.pyc
CHANGED
Binary files a/src/backend/__pycache__/trending_videos_page.cpython-313.pyc and b/src/backend/__pycache__/trending_videos_page.cpython-313.pyc differ
|
|