FROM ubuntu:22.04 # Install dependencies RUN apt-get update && \ apt-get install -y curl wget gnupg2 ca-certificates software-properties-common && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Install Docker (required for Kasm) RUN curl -fsSL https://get.docker.com -o get-docker.sh && \ sh get-docker.sh && \ usermod -aG docker root # Download and extract Kasm Workspaces WORKDIR /tmp RUN curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.17.0.7f020d.tar.gz && \ tar -xf kasm_release_1.17.0.7f020d.tar.gz # Run the installation script with non-interactive mode # Note: Script is in kasm_release/ subdirectory, not directly in /tmp RUN bash kasm_release/install.sh -e noninteractive --admin-password admin123 --user-password user123 # Kasm runs on port 443 by default, but Hugging Face requires port 7860 # We'll need to configure this or use a reverse proxy EXPOSE 443 7860 # Health check HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ CMD curl -f https://localhost:443/health || exit 1 # Start Kasm services CMD ["/opt/kasm/bin/start"]