Spaces:
Paused
Paused
Create Dockerfile
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:20-slim
|
| 2 |
+
|
| 3 |
+
# Install ttyd + Python + basics
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
curl wget git build-essential ca-certificates python3 python3-pip \
|
| 6 |
+
&& curl -L https://github.com/tsl0922/ttyd/releases/latest/download/ttyd.x86_64 -o /usr/local/bin/ttyd \
|
| 7 |
+
&& chmod +x /usr/local/bin/ttyd \
|
| 8 |
+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
# Install Claude Code
|
| 11 |
+
RUN npm install -g @anthropic-ai/claude-code
|
| 12 |
+
|
| 13 |
+
# Install proxy dependencies
|
| 14 |
+
RUN pip3 install --break-system-packages fastapi uvicorn httpx
|
| 15 |
+
|
| 16 |
+
# Mount point for persistent bucket/storage
|
| 17 |
+
RUN mkdir -p /data/workspace /data/claude-config
|
| 18 |
+
WORKDIR /app
|
| 19 |
+
COPY app.py /app/app.py
|
| 20 |
+
COPY proxy.py /app/proxy.py
|
| 21 |
+
COPY www /app/www
|
| 22 |
+
|
| 23 |
+
# HF Spaces expects the app on port 7860
|
| 24 |
+
EXPOSE 7860
|
| 25 |
+
|
| 26 |
+
CMD ["python3", "app.py"]
|