Spaces:
Runtime error
Runtime error
Create sandbox.yml
Browse files- sandbox.yml +92 -0
sandbox.yml
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Sandbox Configuration
|
| 2 |
+
name: "Ubuntu Development Sandbox"
|
| 3 |
+
version: "1.0.0"
|
| 4 |
+
description: "A containerized Ubuntu environment for development and experimentation"
|
| 5 |
+
|
| 6 |
+
# Environment settings
|
| 7 |
+
environment:
|
| 8 |
+
os: "ubuntu:22.04"
|
| 9 |
+
shell: "/bin/bash"
|
| 10 |
+
user: "sandbox"
|
| 11 |
+
home: "/home/sandbox"
|
| 12 |
+
|
| 13 |
+
# Resource limits (adjust based on HuggingFace Space limits)
|
| 14 |
+
resources:
|
| 15 |
+
cpu: "2"
|
| 16 |
+
memory: "4Gi"
|
| 17 |
+
storage: "10Gi"
|
| 18 |
+
|
| 19 |
+
# Network configuration
|
| 20 |
+
network:
|
| 21 |
+
ports:
|
| 22 |
+
- name: "web-server"
|
| 23 |
+
port: 8000
|
| 24 |
+
description: "Main web application port"
|
| 25 |
+
- name: "jupyter"
|
| 26 |
+
port: 8888
|
| 27 |
+
description: "Jupyter Lab interface"
|
| 28 |
+
- name: "dev-server"
|
| 29 |
+
port: 3000
|
| 30 |
+
description: "Development server port"
|
| 31 |
+
|
| 32 |
+
# Pre-installed tools and packages
|
| 33 |
+
software:
|
| 34 |
+
system_packages:
|
| 35 |
+
- curl
|
| 36 |
+
- wget
|
| 37 |
+
- git
|
| 38 |
+
- vim
|
| 39 |
+
- nano
|
| 40 |
+
- htop
|
| 41 |
+
- tree
|
| 42 |
+
- unzip
|
| 43 |
+
- build-essential
|
| 44 |
+
|
| 45 |
+
python_packages:
|
| 46 |
+
- jupyterlab
|
| 47 |
+
- fastapi
|
| 48 |
+
- uvicorn
|
| 49 |
+
- requests
|
| 50 |
+
- pandas
|
| 51 |
+
- numpy
|
| 52 |
+
- matplotlib
|
| 53 |
+
- seaborn
|
| 54 |
+
|
| 55 |
+
node_packages:
|
| 56 |
+
- express
|
| 57 |
+
- nodemon
|
| 58 |
+
- pm2
|
| 59 |
+
|
| 60 |
+
# Security settings
|
| 61 |
+
security:
|
| 62 |
+
run_as_root: false
|
| 63 |
+
sudo_access: true
|
| 64 |
+
network_isolation: false
|
| 65 |
+
readonly_filesystem: false
|
| 66 |
+
|
| 67 |
+
# Startup scripts and services
|
| 68 |
+
startup:
|
| 69 |
+
scripts:
|
| 70 |
+
- "/home/sandbox/init.sh"
|
| 71 |
+
services:
|
| 72 |
+
- name: "jupyter"
|
| 73 |
+
command: "jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root"
|
| 74 |
+
auto_start: false
|
| 75 |
+
- name: "web-server"
|
| 76 |
+
command: "python3 -m http.server 8000"
|
| 77 |
+
auto_start: false
|
| 78 |
+
|
| 79 |
+
# Volume mounts for persistent data
|
| 80 |
+
volumes:
|
| 81 |
+
- name: "projects"
|
| 82 |
+
path: "/home/sandbox/projects"
|
| 83 |
+
description: "User projects and code"
|
| 84 |
+
- name: "tools"
|
| 85 |
+
path: "/home/sandbox/tools"
|
| 86 |
+
description: "Custom tools and utilities"
|
| 87 |
+
|
| 88 |
+
# Environment variables
|
| 89 |
+
env_vars:
|
| 90 |
+
PYTHONPATH: "/home/sandbox/projects:/home/sandbox/tools"
|
| 91 |
+
NODE_ENV: "development"
|
| 92 |
+
JUPYTER_ENABLE_LAB: "yes"
|