Spaces:
Sleeping
Sleeping
File size: 1,082 Bytes
038c860 b205898 3034be5 b205898 3034be5 9896581 3034be5 9896581 3034be5 9896581 b205898 9896581 b205898 d0aa81a 038c860 b205898 038c860 b205898 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# 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"] |