Pepguy commited on
Commit
0bc4572
·
verified ·
1 Parent(s): 57ed156

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -9
Dockerfile CHANGED
@@ -1,21 +1,24 @@
1
- # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
-
4
- FROM python:3.9
5
 
 
6
  RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
7
 
 
8
  RUN useradd -m -u 1000 user
9
  USER user
10
- ENV PATH="/home/user/.local/bin:$PATH"
11
 
 
12
  WORKDIR /app
13
 
14
- COPY --chown=user ./requirements.txt requirements.txt
15
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
16
 
 
17
  COPY --chown=user . /app
18
 
 
 
19
 
20
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
21
-
 
1
+ FROM node:20
 
 
 
2
 
3
+ # Install ffmpeg
4
  RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
5
 
6
+ # Create a non-root user with UID 1000
7
  RUN useradd -m -u 1000 user
8
  USER user
 
9
 
10
+ # Set working directory
11
  WORKDIR /app
12
 
13
+ # Copy package files and install dependencies
14
+ COPY --chown=user package*.json ./
15
+ RUN npm install
16
 
17
+ # Copy the rest of the application source
18
  COPY --chown=user . /app
19
 
20
+ # Expose the port if needed (optional, depending on the hosting environment)
21
+ EXPOSE 7860
22
 
23
+ # Run the Node.js application
24
+ CMD ["node", "app.js"]