Spaces:
Build error
Build error
Create Dockerfile
Browse files- Dockerfile +24 -0
Dockerfile
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM codercom/code-server:latest
|
2 |
+
|
3 |
+
# Install Python and Node.js
|
4 |
+
RUN sudo apt-get update && \
|
5 |
+
sudo apt-get install -y python3 python3-pip curl && \
|
6 |
+
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && \
|
7 |
+
sudo apt-get install -y nodejs
|
8 |
+
|
9 |
+
# Setup working directory
|
10 |
+
WORKDIR /home/coder/project
|
11 |
+
|
12 |
+
# Add your files
|
13 |
+
COPY . /home/coder/project
|
14 |
+
|
15 |
+
# Install Python requirements if any
|
16 |
+
RUN pip3 install -r requirements.txt || true
|
17 |
+
|
18 |
+
# Set password (optional)
|
19 |
+
ENV PASSWORD=hfspace
|
20 |
+
|
21 |
+
# Expose for HF Spaces
|
22 |
+
EXPOSE 7860
|
23 |
+
|
24 |
+
CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "."]
|