Download Dockerfile from Nailioq/Me: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/spaces/Nailioq/Me/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Nailioq/Me/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Nailioq/Me/resolve/main/Dockerfile
1.16 kB
| FROM silentdemonsd/wzmlx:hk | |
| # Install fakeroot, python3, and patch apt-get | |
| RUN apt-get update && apt-get install -y fakeroot python3 python3-pip && \ | |
| mv /usr/bin/apt-get /usr/bin/.apt-get && \ | |
| echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get "$@"' > /usr/bin/apt-get && \ | |
| chmod +x /usr/bin/apt-get && \ | |
| rm -rf /var/lib/apt/lists/* && \ | |
| useradd -m -u 1000 user | |
| # Clone the repository using the secret mm and set permissions | |
| RUN --mount=type=secret,id=mm,mode=0444,required=true \ | |
| git clone $(cat /run/secrets/mm) /usr/src/app && \ | |
| chown -R user:user /usr/src/app | |
| # Set working directory | |
| WORKDIR /usr/src/app | |
| # Install packages from packages.txt (cloned from the repository) | |
| RUN apt-get update && \ | |
| if [ -f packages.txt ]; then xargs -r -a packages.txt apt-get install -y; fi && \ | |
| rm -rf /var/lib/apt/lists/* && apt-get clean | |
| # Install Python requirements from the cloned requirements.txt | |
| RUN if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; else echo "requirements.txt not found, skipping"; fi | |
| # Optional: install gradio + uvicorn | |
| EXPOSE 7860 | |
| CMD python3 --version && python3 app.py |