abdullah-113 commited on
Commit
b3c672b
·
verified ·
1 Parent(s): c99ff36

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -25
Dockerfile CHANGED
@@ -1,25 +1,18 @@
1
- # Use an official Python runtime as a parent image
2
- FROM python:3.10-slim
3
-
4
- # Hugging Face requires the app to run as user '1000'
5
- RUN useradd -m -u 1000 user
6
- USER user
7
- ENV PATH="/home/user/.local/bin:$PATH"
8
-
9
- # Set the working directory
10
- WORKDIR /app
11
-
12
- # Copy the current directory contents into the container
13
- COPY --chown=user . /app
14
-
15
- # Install dependencies
16
- RUN pip install --no-cache-dir -r requirements.txt
17
-
18
- # Make the startup script executable
19
- RUN chmod +x run.sh
20
-
21
- # Expose the port Hugging Face looks for
22
- EXPOSE 7860
23
-
24
- # Command to run the dual-server script
25
- CMD ["./run.sh"]
 
1
+ FROM python:3.10-slim
2
+
3
+ # Force Python logs to show up immediately
4
+ ENV PYTHONUNBUFFERED=1
5
+
6
+ RUN useradd -m -u 1000 user
7
+ USER user
8
+ ENV PATH="/home/user/.local/bin:$PATH"
9
+
10
+ WORKDIR /app
11
+ COPY --chown=user . /app
12
+
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ EXPOSE 7860
16
+
17
+ # Let the Python Orchestrator handle the dual-boot
18
+ CMD ["python", "start.py"]