shkumar156 commited on
Commit
b93e9bd
·
verified ·
1 Parent(s): c5a1c0a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -30
Dockerfile CHANGED
@@ -1,31 +1,34 @@
1
- # Use official Python image as base
2
- FROM python:3.11-slim
3
-
4
- # Set working directory
5
- WORKDIR /app
6
-
7
- # Install system dependencies (including libgl1 for OpenCV and Node.js)
8
- RUN apt-get update && apt-get install -y \
9
- git \
10
- curl \
11
- libgl1 \
12
- && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
13
- && apt-get install -y nodejs \
14
- && rm -rf /var/lib/apt/lists/*
15
-
16
- # Install Python dependencies
17
- COPY requirements.txt .
18
- RUN pip install --no-cache-dir -r requirements.txt
19
-
20
- # Install Node.js dependencies
21
- COPY package*.json ./
22
- RUN npm install --omit=dev
23
-
24
- # Copy the rest of your backend code
25
- COPY . .
26
-
27
- # Expose the port your Node.js server runs on (Hugging Face expects 7860)
28
- EXPOSE 7860
29
-
30
- # Start the Node.js backend
 
 
 
31
  CMD ["node", "server.js"]
 
1
+ # Use official Python image as base
2
+ FROM python:3.11-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies (including libgl1 for OpenCV and Node.js)
8
+ RUN apt-get update && apt-get install -y \
9
+ git \
10
+ curl \
11
+ libgl1 \
12
+ && curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \
13
+ && apt-get install -y nodejs \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # Ensure /data/uploads exists and is writable
17
+ RUN mkdir -p /data/uploads && chmod -R 777 /data
18
+
19
+ # Install Python dependencies
20
+ COPY requirements.txt .
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Install Node.js dependencies
24
+ COPY package*.json ./
25
+ RUN npm install --omit=dev
26
+
27
+ # Copy the rest of your backend code
28
+ COPY . .
29
+
30
+ # Expose the port your Node.js server runs on (Hugging Face expects 7860)
31
+ EXPOSE 7860
32
+
33
+ # Start the Node.js backend
34
  CMD ["node", "server.js"]