File size: 788 Bytes
66b9dc6 14d4369 66b9dc6 14d4369 10a3aa6 8681aca 66b9dc6 14d4369 8681aca 14d4369 ae62098 10a3aa6 ae62098 14d4369 ae62098 66b9dc6 10a3aa6 66b9dc6 10a3aa6 14d4369 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | FROM node:20-bookworm-slim
# System dependencies including Python for the sync script
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
ca-certificates \
curl \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g opencode-ai
# Install HF Hub for data synchronization
RUN pip3 install huggingface_hub --break-system-packages
ENV HOME=/home/node
ENV PATH=/home/node/.local/bin:/usr/local/bin:${PATH}
RUN mkdir -p $HOME/workspace && chown -R node:node $HOME
# Copy the custom logic files into the container
COPY sync.py $HOME/sync.py
COPY start.sh $HOME/start.sh
RUN chown node:node $HOME/sync.py $HOME/start.sh && chmod +x $HOME/start.sh
USER node
WORKDIR $HOME/workspace
EXPOSE 4096
CMD ["/home/node/start.sh"]
|