Spaces:
Sleeping
Sleeping
| # Use a stable and small Node.js image | |
| FROM node:18-alpine | |
| # Install Git and Git LFS, which are required to clone from the Hugging Face Hub | |
| RUN apk add --no-cache git git-lfs | |
| # Set the working directory inside the container | |
| WORKDIR /app | |
| # Initialize Git LFS in the container environment | |
| RUN git lfs install | |
| # --- IMPORTANT STEP: Using your specified multi-step logic --- | |
| # 1. Clone the repository. This creates a folder named 'waliyan' inside /app | |
| RUN git clone --depth 1 https://huggingface.co/datasets/devusman/waliyan | |
| # 2. Move the data folder from inside 'waliyan' up to the app's root folder | |
| # This is the equivalent of 'copy' and 'paste' | |
| RUN mv waliyan/data . | |
| # 3. Clean up by removing the now-empty 'waliyan' folder | |
| RUN rm -rf waliyan | |
| # --- Data is now correctly at /app/data --- | |
| # Copy package files and install dependencies | |
| COPY package.json package-lock.json* ./ | |
| RUN npm install | |
| # Copy the rest of your application code | |
| COPY . . | |
| # Expose the port that Hugging Face Spaces expects. | |
| EXPOSE 7860 | |
| # The command to start your Express server | |
| CMD ["node", "index.js"] |