Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +17 -22
Dockerfile
CHANGED
|
@@ -1,22 +1,17 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
#
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
# Open the port so the web can be accessed
|
| 19 |
-
EXPOSE 7860
|
| 20 |
-
|
| 21 |
-
# Start the server
|
| 22 |
-
CMD ["npm", "start"]
|
|
|
|
| 1 |
+
# Use official Node.js LTS image
|
| 2 |
+
FROM node:18-slim
|
| 3 |
+
|
| 4 |
+
# Set the main working directory inside the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy all files into the container
|
| 8 |
+
COPY . .
|
| 9 |
+
|
| 10 |
+
# Install all dependencies
|
| 11 |
+
RUN npm install
|
| 12 |
+
|
| 13 |
+
# Expose the port so Hugging Face can access the app
|
| 14 |
+
EXPOSE 7860
|
| 15 |
+
|
| 16 |
+
# Start the server
|
| 17 |
+
CMD ["npm", "start"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|