Emalawi19 commited on
Commit
cb0e4f0
·
verified ·
1 Parent(s): 7ac132c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Node.js image
2
+ FROM node:20-slim
3
+
4
+ # Set up a new user to avoid Hugging Face permission issues
5
+ RUN useradd -m -u 1000 user
6
+ USER user
7
+ ENV HOME=/home/user
8
+ WORKDIR $HOME/app
9
+
10
+ # Copy configuration files
11
+ COPY --chown=user package*.json ./
12
+
13
+ # Install dependencies
14
+ RUN npm install
15
+
16
+ # Copy the rest of the application files
17
+ COPY --chown=user . .
18
+
19
+ # Expose the default port for the API gateway
20
+ EXPOSE 7860
21
+
22
+ # Start the Node.js headless server
23
+ CMD ["node", "server.js"]