Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +15 -17
Dockerfile
CHANGED
|
@@ -1,30 +1,28 @@
|
|
| 1 |
-
# We
|
| 2 |
-
FROM linuxserver/webtop:
|
| 3 |
|
| 4 |
# --------------------------------------------------------
|
| 5 |
-
# CONFIGURATION
|
| 6 |
# --------------------------------------------------------
|
| 7 |
-
|
| 8 |
-
# Hugging Face Spaces expect the application to run on port 7860.
|
| 9 |
-
# Webtop defaults to 3000, so we modify the internal Nginx config to listen on 7860.
|
| 10 |
RUN sed -i 's/3000/7860/g' /defaults/nginx.conf
|
| 11 |
|
| 12 |
-
# Set
|
| 13 |
ENV PUID=1000
|
| 14 |
ENV PGID=1000
|
| 15 |
|
| 16 |
-
# Set Timezone (Optional, change if needed)
|
| 17 |
-
ENV TZ=Etc/UTC
|
| 18 |
-
|
| 19 |
# --------------------------------------------------------
|
| 20 |
-
#
|
| 21 |
# --------------------------------------------------------
|
| 22 |
-
#
|
| 23 |
-
|
| 24 |
-
RUN apk add --no-cache \
|
| 25 |
python3 \
|
| 26 |
-
|
| 27 |
git \
|
| 28 |
-
firefox
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
-
# The container entrypoint handles the
|
|
|
|
| 1 |
+
# We are switching to 'ubuntu-xfce' because 'alpine-xfce' is not valid
|
| 2 |
+
FROM linuxserver/webtop:ubuntu-xfce
|
| 3 |
|
| 4 |
# --------------------------------------------------------
|
| 5 |
+
# CONFIGURATION
|
| 6 |
# --------------------------------------------------------
|
| 7 |
+
# Change port from 3000 to 7860 for Hugging Face
|
|
|
|
|
|
|
| 8 |
RUN sed -i 's/3000/7860/g' /defaults/nginx.conf
|
| 9 |
|
| 10 |
+
# Set User permissions
|
| 11 |
ENV PUID=1000
|
| 12 |
ENV PGID=1000
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
# --------------------------------------------------------
|
| 15 |
+
# PRE-INSTALL APPS (The "Memory" Part)
|
| 16 |
# --------------------------------------------------------
|
| 17 |
+
# Since we switched to Ubuntu, we use 'apt-get' instead of 'apk'
|
| 18 |
+
RUN apt-get update && apt-get install -y \
|
|
|
|
| 19 |
python3 \
|
| 20 |
+
python3-pip \
|
| 21 |
git \
|
| 22 |
+
firefox \
|
| 23 |
+
nano \
|
| 24 |
+
vlc \
|
| 25 |
+
# Add any other apps here
|
| 26 |
+
&& apt-get clean
|
| 27 |
|
| 28 |
+
# The container entrypoint handles the startup
|