Spaces:
Sleeping
Sleeping
updated
Browse files- Dockerfile +16 -10
- waliyan +1 -0
Dockerfile
CHANGED
|
@@ -10,23 +10,29 @@ WORKDIR /app
|
|
| 10 |
# Initialize Git LFS in the container environment
|
| 11 |
RUN git lfs install
|
| 12 |
|
| 13 |
-
# --- IMPORTANT STEP ---
|
| 14 |
-
# Clone your 'waliyan' dataset and place its contents into a local 'data' folder.
|
| 15 |
-
# The "--depth 1" flag makes the download faster by only getting the latest version.
|
| 16 |
-
RUN git clone --depth 1 https://huggingface.co/datasets/devusman/waliyan data
|
| 17 |
|
| 18 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
COPY package.json package-lock.json* ./
|
| 20 |
-
|
| 21 |
-
RUN npm i
|
| 22 |
|
| 23 |
-
# Copy the rest of your application code
|
| 24 |
COPY . .
|
| 25 |
|
| 26 |
# Expose the port that Hugging Face Spaces expects.
|
| 27 |
-
# The platform will detect this and route traffic accordingly.
|
| 28 |
EXPOSE 7860
|
| 29 |
|
| 30 |
# The command to start your Express server
|
| 31 |
-
# Your code will now find the 'data' folder at /app/data
|
| 32 |
CMD ["node", "index.js"]
|
|
|
|
| 10 |
# Initialize Git LFS in the container environment
|
| 11 |
RUN git lfs install
|
| 12 |
|
| 13 |
+
# --- IMPORTANT STEP: Using your specified multi-step logic ---
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
# 1. Clone the repository. This creates a folder named 'waliyan' inside /app
|
| 16 |
+
RUN git clone --depth 1 https://huggingface.co/datasets/devusman/waliyan
|
| 17 |
+
|
| 18 |
+
# 2. Move the data folder from inside 'waliyan' up to the app's root folder
|
| 19 |
+
# This is the equivalent of 'copy' and 'paste'
|
| 20 |
+
RUN mv waliyan/data .
|
| 21 |
+
|
| 22 |
+
# 3. Clean up by removing the now-empty 'waliyan' folder
|
| 23 |
+
RUN rm -rf waliyan
|
| 24 |
+
|
| 25 |
+
# --- Data is now correctly at /app/data ---
|
| 26 |
+
|
| 27 |
+
# Copy package files and install dependencies
|
| 28 |
COPY package.json package-lock.json* ./
|
| 29 |
+
RUN npm install
|
|
|
|
| 30 |
|
| 31 |
+
# Copy the rest of your application code
|
| 32 |
COPY . .
|
| 33 |
|
| 34 |
# Expose the port that Hugging Face Spaces expects.
|
|
|
|
| 35 |
EXPOSE 7860
|
| 36 |
|
| 37 |
# The command to start your Express server
|
|
|
|
| 38 |
CMD ["node", "index.js"]
|
waliyan
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
Subproject commit 3a8d31ad038421ea3211533c4a5028e85326620f
|