Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +30 -0
Dockerfile
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# We use the Alpine-XFCE version for a very lightweight "small linux" footprint
|
| 2 |
+
FROM linuxserver/webtop:alpine-xfce
|
| 3 |
+
|
| 4 |
+
# --------------------------------------------------------
|
| 5 |
+
# CONFIGURATION FOR HUGGING FACE
|
| 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 the User ID to 1000 (Hugging Face default user) to avoid permission issues
|
| 13 |
+
ENV PUID=1000
|
| 14 |
+
ENV PGID=1000
|
| 15 |
+
|
| 16 |
+
# Set Timezone (Optional, change if needed)
|
| 17 |
+
ENV TZ=Etc/UTC
|
| 18 |
+
|
| 19 |
+
# --------------------------------------------------------
|
| 20 |
+
# OPTIONAL: PRE-INSTALL APPS
|
| 21 |
+
# --------------------------------------------------------
|
| 22 |
+
# You can install apps here so they exist every time the space restarts.
|
| 23 |
+
# Example: Installing Python3, Git, and Firefox
|
| 24 |
+
RUN apk add --no-cache \
|
| 25 |
+
python3 \
|
| 26 |
+
py3-pip \
|
| 27 |
+
git \
|
| 28 |
+
firefox
|
| 29 |
+
|
| 30 |
+
# The container entrypoint handles the rest!
|