Spaces:
Sleeping
Sleeping
Download Dockerfile from AEUPH/NeuralOS-Hypervisor: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/spaces/AEUPH/NeuralOS-Hypervisor/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/AEUPH/NeuralOS-Hypervisor/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/AEUPH/NeuralOS-Hypervisor/resolve/main/Dockerfile
1.16 kB
| # NeuralOS Hypervisor v3 -- Text2OS image OS | |
| # | |
| # CPU-first image (the Space is described as "running entirely on CPU"). | |
| # For a GPU Space, use Dockerfile.cuda instead. | |
| FROM python:3.11-slim | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| # oneDNN / OpenMP threading: use the whole box, avoid oversubscription | |
| OMP_NUM_THREADS=0 \ | |
| # keep the deterministic engine fallback on by default | |
| NEURALOS_ENGINE=auto \ | |
| NEURALOS_CACHE=/tmp/neural_cache | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgomp1 libglib2.0-0 libsm6 libxrender1 libxext6 curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # torch CPU wheels: dramatically smaller and faster to boot than CUDA wheels | |
| RUN pip install --upgrade pip && \ | |
| pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu | |
| COPY requirements.txt . | |
| RUN pip install -r requirements.txt | |
| # real files, not a heredoc -> cacheable layers, diffable source | |
| COPY app.py index.html ./ | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user PATH=/home/user/.local/bin:$PATH | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |