Norsec93 commited on
Commit
5142cb0
·
verified ·
1 Parent(s): 70226ad

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -16
Dockerfile CHANGED
@@ -1,20 +1,10 @@
1
- # Use an official lightweight Node.js runtime as the base image
2
- FROM node:20-slim
3
 
4
- # Set the working directory inside the container
5
  WORKDIR /app
 
 
6
 
7
- # Copy package configuration files first to leverage Docker's cache layer
8
- COPY package*.json ./
9
 
10
- # Install production dependencies only
11
- RUN npm install --omit=dev
12
-
13
- # Copy the actual server source code
14
- COPY server.js ./
15
-
16
- # Explicitly expose the Hugging Face application port
17
- EXPOSE 3000
18
-
19
- # Start the Node.js reverse proxy
20
- CMD ["node", "server.js"]
 
1
+ FROM python:3.11-slim
 
2
 
 
3
  WORKDIR /app
4
+ COPY requirements.txt .
5
+ RUN pip install --no-cache-dir -r requirements.txt
6
 
7
+ COPY main.py .
8
+ EXPOSE 7860
9
 
10
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]