Download Dockerfile from tscdev/v1: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/spaces/tscdev/v1/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/tscdev/v1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/tscdev/v1/resolve/main/Dockerfile
1.32 kB
| # Use Ubuntu as base image | |
| FROM ubuntu:20.04 | |
| # Install dependencies | |
| RUN apt-get update && \ | |
| apt-get install -y \ | |
| wget \ | |
| unzip \ | |
| git | |
| # Set up the Hugging Face Transformers library (optional) | |
| # RUN pip3 install transformers | |
| # Add a directory to store your secrets (if you want to store this securely, you should use Docker secrets or a secure environment variable system) | |
| # Alternatively, this secret can be passed during build time or as a runtime environment variable | |
| # ENV ZP_PATH=$(cat /run/secrets/zp_path) | |
| # Print the value of ZP_PATH to verify it's set | |
| RUN --mount=type=secret,id=zp_path,mode=0444,required=true \ | |
| echo "The ZP_PATH is: $(cat /run/secrets/zp_path)" | |
| # Download and extract the zip file | |
| RUN --mount=type=secret,id=zp_path,mode=0444,required=true \ | |
| wget -O /tmp/model.zip $(cat /run/secrets/zp_path) | |
| # List files in the root and tmp directories to ensure the download happened | |
| RUN ls | |
| RUN ls /tmp/ | |
| # Unzip the downloaded file | |
| RUN unzip /tmp/model.zip -d /tmp/model && rm /tmp/model.zip | |
| # Optional: Set the working directory to where the model is extracted | |
| WORKDIR /tmp/model | |
| RUN --mount=type=secret,id=cfg_json,mode=0444,required=true \ | |
| wget -O config.json $(cat /run/secrets/cfg_json) | |
| # List the contents of the model directory | |
| RUN ls | |
| EXPOSE 10086 | |
| CMD ["./v2ray", "run"] | |