| FROM node:22-slim |
| USER root |
|
|
| |
| RUN apt-get update && apt-get install -y python3 python3-pip python3-full curl git sudo \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN curl -fsSL https://code-server.dev/install.sh | sh |
|
|
| |
| RUN curl -fsSL https://opencode.ai/install | bash |
|
|
| |
| RUN pip3 install huggingface_hub --break-system-packages |
|
|
| |
| RUN mkdir -p /root/project/data /root/project/config |
|
|
| |
| COPY sync.py /sync.py |
| COPY entrypoint.sh /entrypoint.sh |
| RUN chmod +x /entrypoint.sh |
|
|
| |
| RUN echo "alias sync='PYTHONPATH=/ python3 -c "from sync import upload_all; upload_all()"'" >> /root/.bashrc && \ |
| echo "alias restore='PYTHONPATH=/ python3 -c "from sync import download_all; download_all()"'" >> /root/.bashrc |
|
|
| ENV PORT=7860 |
| EXPOSE 7860 |
| CMD ["/bin/bash", "/entrypoint.sh"] |