Charan5775 commited on
Commit
0faea03
·
verified ·
1 Parent(s): 6fe9c49

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -7
Dockerfile CHANGED
@@ -1,15 +1,16 @@
1
  # Use a base Python image
2
  FROM python:3.9-slim
3
 
4
- # Install curl, git, and dependencies for Node.js
5
  RUN apt-get update && \
6
- apt-get install -y curl git ca-certificates lsb-release
7
 
8
- # Install Node.js v18.x from NodeSource (compatible with pnpm)
9
- RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
10
  apt-get install -y nodejs
 
11
  # Install pnpm globally
12
- RUN npm install -g pnpm
13
 
14
  # Install Python dependencies (Gradio)
15
  RUN pip install gradio
@@ -23,10 +24,10 @@ WORKDIR /app
23
  # Install Node.js dependencies using pnpm
24
  RUN pnpm install
25
 
26
- # Build the Node.js app (if it's a buildable frontend, like React)
27
  RUN pnpm run build
28
 
29
- # Expose port (adjust this if your app uses a different port)
30
  EXPOSE 3000
31
 
32
  # Command to start the Node.js app
 
1
  # Use a base Python image
2
  FROM python:3.9-slim
3
 
4
+ # Install curl, git, and additional dependencies
5
  RUN apt-get update && \
6
+ apt-get install -y curl git ca-certificates lsb-release build-essential libtool libssl-dev zlib1g-dev
7
 
8
+ # Install Node.js v20.x (ensure compatibility with pnpm and other tools)
9
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
10
  apt-get install -y nodejs
11
+
12
  # Install pnpm globally
13
+ RUN curl -fsSL https://get.pnpm.io/v6.16.js | node - add --global pnpm
14
 
15
  # Install Python dependencies (Gradio)
16
  RUN pip install gradio
 
24
  # Install Node.js dependencies using pnpm
25
  RUN pnpm install
26
 
27
+ # Build the Node.js app
28
  RUN pnpm run build
29
 
30
+ # Expose port (adjust if necessary)
31
  EXPOSE 3000
32
 
33
  # Command to start the Node.js app