Spaces:
Sleeping
Sleeping
Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM debian:11-slim
|
| 2 |
+
|
| 3 |
+
# Install code-server and required tools
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
curl \
|
| 6 |
+
sudo \
|
| 7 |
+
git \
|
| 8 |
+
procps \
|
| 9 |
+
&& curl -fsSL https://code-server.dev/install.sh | sh
|
| 10 |
+
|
| 11 |
+
# Hugging Face requires a user with ID 1000
|
| 12 |
+
RUN useradd -m -u 1000 user
|
| 13 |
+
USER user
|
| 14 |
+
ENV HOME=/home/user \
|
| 15 |
+
PATH=/home/user/.local/bin:$PATH
|
| 16 |
+
WORKDIR $HOME/app
|
| 17 |
+
|
| 18 |
+
# Expose the specific port Hugging Face expects
|
| 19 |
+
EXPOSE 7860
|
| 20 |
+
|
| 21 |
+
# Start code-server without a password for now (we'll use Space secrets later)
|
| 22 |
+
# Binding to port 7860 is mandatory
|
| 23 |
+
CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]
|