Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +7 -2
Dockerfile
CHANGED
@@ -22,6 +22,7 @@ RUN apt-get update && apt-get install -y \
|
|
22 |
x11vnc \
|
23 |
novnc \
|
24 |
websockify \
|
|
|
25 |
&& rm -rf /var/lib/apt/lists/*
|
26 |
|
27 |
# Create a non-root user for Hugging Face Spaces
|
@@ -40,11 +41,15 @@ ENV PATH="/venv/bin:$PATH"
|
|
40 |
RUN pip install --no-cache-dir --upgrade pip && \
|
41 |
pip install flask pygobject toga
|
42 |
|
43 |
-
#
|
|
|
|
|
|
|
44 |
EXPOSE 7860
|
45 |
|
46 |
-
# Start Xvfb,
|
47 |
CMD Xvfb :99 -screen 0 1024x768x16 & \
|
48 |
x11vnc -display :99 -forever -nopw & \
|
49 |
websockify --web /usr/share/novnc 6080 localhost:5900 & \
|
|
|
50 |
python3 app.py
|
|
|
22 |
x11vnc \
|
23 |
novnc \
|
24 |
websockify \
|
25 |
+
nginx \
|
26 |
&& rm -rf /var/lib/apt/lists/*
|
27 |
|
28 |
# Create a non-root user for Hugging Face Spaces
|
|
|
41 |
RUN pip install --no-cache-dir --upgrade pip && \
|
42 |
pip install flask pygobject toga
|
43 |
|
44 |
+
# Copy Nginx configuration
|
45 |
+
COPY --chown=user nginx.conf /etc/nginx/nginx.conf
|
46 |
+
|
47 |
+
# Expose port 7860 for Hugging Face Spaces
|
48 |
EXPOSE 7860
|
49 |
|
50 |
+
# Start Xvfb, x11vnc, noVNC, Nginx, and Flask app
|
51 |
CMD Xvfb :99 -screen 0 1024x768x16 & \
|
52 |
x11vnc -display :99 -forever -nopw & \
|
53 |
websockify --web /usr/share/novnc 6080 localhost:5900 & \
|
54 |
+
nginx & \
|
55 |
python3 app.py
|