Download Dockerfile from locmaymo/st: direct link, hf CLI and curl.
- Browser
- Download file 890 Bytes
-
https://huggingface.co/spaces/locmaymo/st/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/locmaymo/st/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/locmaymo/st/resolve/main/Dockerfile
890 Bytes
| FROM node:20-slim | |
| # Cài đặt các gói cần thiết | |
| RUN apt-get update && \ | |
| apt-get install -y git python3 make g++ && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Image node đã có sẵn user "node" (UID 1000) | |
| # Chuyển sang user này luôn để khớp với yêu cầu của Hugging Face | |
| USER node | |
| ENV HOME=/home/node | |
| # Thiết lập thư mục làm việc | |
| WORKDIR $HOME/app | |
| # Clone code (chạy dưới quyền user node nên không lo lỗi permission) | |
| RUN git clone https://github.com/locmaymo/st . | |
| # Cài đặt thư viện | |
| RUN npm install | |
| RUN echo "port: 7860" > config.yaml && \ | |
| echo "listen: true" >> config.yaml && \ | |
| echo "securityOverride: true" >> config.yaml && \ | |
| echo "whitelistMode: false" >> config.yaml && \ | |
| echo "basicAuthMode: false" >> config.yaml | |
| # Mở cổng 7860 | |
| EXPOSE 7860 | |
| # Chạy server | |
| CMD ["node", "server.js"] |