Spaces:
Paused
Paused
| FROM ubuntu:22.04 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # 1. Install dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| sudo tmux curl git openssh-client nano unzip python3 python3-pip python3-venv \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2. Install Hugging Face CLI | |
| RUN curl -LsSf https://hf.co/cli/install.sh | bash | |
| # 3. Install Code-Server (VS Code for Web) | |
| RUN curl -fsSL https://code-server.dev/install.sh | sh | |
| # 4. Setup User | |
| RUN (userdel -r ubuntu || true) && \ | |
| useradd -m -u 1000 user && \ | |
| echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | |
| USER user | |
| WORKDIR /home/user | |
| # 5. Copy and run entrypoint | |
| COPY --chown=user:user entrypoint.sh /home/user/entrypoint.sh | |
| RUN chmod +x /home/user/entrypoint.sh | |
| EXPOSE 7860 | |
| CMD ["/home/user/entrypoint.sh"] | |