Spaces:
Runtime error
Runtime error
Download Dockerfile from API-Handler/umlim-openai: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/spaces/API-Handler/umlim-openai/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/API-Handler/umlim-openai/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/API-Handler/umlim-openai/resolve/main/Dockerfile
1.05 kB
| # Use Node.js LTS version | |
| FROM node:18-slim | |
| # Install wget | |
| USER root | |
| RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/* | |
| # Switch to the "node" user for security | |
| USER node | |
| # Set home to the user's home directory and add local bin to PATH | |
| ENV HOME=/home/node \ | |
| PATH=/home/node/.local/bin:$PATH | |
| # Set the working directory to the user's home directory | |
| WORKDIR $HOME/app | |
| # Copy package files with correct ownership | |
| COPY --chown=node:node package*.json ./ | |
| # Install dependencies | |
| RUN npm install | |
| # Copy the application code with correct ownership | |
| COPY --chown=node:node . . | |
| # Download required files | |
| RUN wget https://huggingface.co/datasets/API-Handler/unlim-openai/resolve/main/apiHandler.js && \ | |
| wget https://huggingface.co/datasets/API-Handler/unlim-openai/resolve/main/api_keys.txt && \ | |
| wget https://huggingface.co/datasets/API-Handler/unlim-openai/resolve/main/server.js | |
| # Expose port 7860 (required for Hugging Face Spaces) | |
| EXPOSE 7860 | |
| # Start the application using Node.js | |
| CMD ["node", "server.js"] |