Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +47 -33
Dockerfile
CHANGED
|
@@ -1,40 +1,54 @@
|
|
| 1 |
-
FROM ubuntu:
|
|
|
|
| 2 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 3 |
-
ENV HOME=/home/ubuntu
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
|
|
|
| 12 |
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 13 |
|
| 14 |
-
#
|
| 15 |
-
RUN pip3 install --
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
#
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ubuntu:22.04
|
| 2 |
+
|
| 3 |
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
| 4 |
|
| 5 |
+
# System packages: code-server + Python + tools
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
+
python3 python3-pip \
|
| 8 |
+
git curl wget jq tmux \
|
| 9 |
+
nodejs npm \
|
| 10 |
+
httpie \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
+
# Install code-server
|
| 14 |
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
| 15 |
|
| 16 |
+
# Python packages
|
| 17 |
+
RUN pip3 install --no-cache-dir \
|
| 18 |
+
picoclaw==2026.3.20 \
|
| 19 |
+
httpx \
|
| 20 |
+
flask \
|
| 21 |
+
gunicorn
|
| 22 |
+
|
| 23 |
+
# Workspace
|
| 24 |
+
WORKDIR /app
|
| 25 |
+
|
| 26 |
+
# Create directory structure
|
| 27 |
+
RUN mkdir -p /app/kb /app/hooks /app/.picoclaw/workspace/sessions \
|
| 28 |
+
/app/.picoclaw/workspace/cron /app/hook_logs
|
| 29 |
+
|
| 30 |
+
# Copy KB files (served by built-in HTTP server on port 8811)
|
| 31 |
+
COPY kb/ /app/kb/
|
| 32 |
+
|
| 33 |
+
# Copy hook scripts
|
| 34 |
+
COPY hooks/ /app/hooks/
|
| 35 |
+
RUN chmod +x /app/hooks/*.py
|
| 36 |
+
|
| 37 |
+
# KB HTTP server (Flask on port 8811)
|
| 38 |
+
COPY kb_server.py /app/kb_server.py
|
| 39 |
+
|
| 40 |
+
# Picoclaw config generator
|
| 41 |
+
COPY gen_config.py /app/gen_config.py
|
| 42 |
+
|
| 43 |
+
# Startup script — runs code-server + KB server + picoclaw
|
| 44 |
+
COPY start.sh /app/start.sh
|
| 45 |
+
RUN chmod +x /app/start.sh
|
| 46 |
+
|
| 47 |
+
# Expose: 7860 (code-server), 8811 (KB server)
|
| 48 |
+
EXPOSE 7860 8811
|
| 49 |
+
|
| 50 |
+
# Health check — KB server
|
| 51 |
+
HEALTHCHECK --interval=120s --timeout=10s --retries=3 \
|
| 52 |
+
CMD curl -f http://localhost:8811/health || exit 1
|
| 53 |
+
|
| 54 |
+
CMD ["/app/start.sh"]
|