Spaces:
Sleeping
Sleeping
Download Dockerfile from veltrixcode/lofi: direct link, hf CLI and curl.
- Browser
- Download file 874 Bytes
-
https://huggingface.co/spaces/veltrixcode/lofi/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/veltrixcode/lofi/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/veltrixcode/lofi/resolve/main/Dockerfile
874 Bytes
| # Use a Node.js Slim image for the builder stage | |
| FROM node:24.0.1-slim AS builder | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy package files and install dependencies | |
| COPY package*.json ./ | |
| RUN npm ci | |
| # Copy the rest of the source files and build the SvelteKit app | |
| COPY . . | |
| RUN npm run build | |
| # Prune dependencies to production-only | |
| RUN npm prune --production | |
| # Use another Node.js Slim image for the final stage | |
| FROM node:24.0.1-slim AS runner | |
| # Set the working directory | |
| WORKDIR /app | |
| # Copy the built app and production node_modules from the builder stage | |
| COPY --from=builder /app/build build/ | |
| COPY --from=builder /app/node_modules node_modules/ | |
| COPY package.json . | |
| # Expose the port the app runs on | |
| EXPOSE 7860 | |
| # Set the environment to production | |
| ENV NODE_ENV=production | |
| ENV PORT=7860 | |
| ENV HOST=0.0.0.0 | |
| # Specify the command to run the app | |
| CMD ["node", "build"] | |