Spaces:
Sleeping
Sleeping
| # GPU-enabled sandbox for AI agents | |
| # Base: NVIDIA CUDA with Python support | |
| FROM nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04 | |
| # Prevent interactive prompts during package installation | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Install Python 3.12 and Dev Mode required packages | |
| RUN apt-get update && \ | |
| apt-get install -y \ | |
| software-properties-common && \ | |
| add-apt-repository -y ppa:deadsnakes/ppa && \ | |
| apt-get update && \ | |
| apt-get install -y \ | |
| python3.12 \ | |
| python3.12-venv \ | |
| python3.12-dev \ | |
| python3-pip \ | |
| bash \ | |
| git git-lfs \ | |
| wget curl procps \ | |
| htop vim nano \ | |
| jq \ | |
| tmux \ | |
| build-essential \ | |
| openssh-client && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Set Python 3.12 as default | |
| RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \ | |
| update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 | |
| # Set up user with uid 1000 (required for Dev Mode) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| CUDA_HOME=/usr/local/cuda \ | |
| LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH | |
| # Install uv (fast Python package manager) for user | |
| RUN curl -LsSf https://astral.sh/uv/install.sh | sh | |
| WORKDIR /app | |
| COPY --chown=user . /app | |
| EXPOSE 7860 | |
| # Just keep the container alive - agent uses SSH to interact | |
| CMD ["python", "-m", "http.server", "7860"] | |