Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- 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
|
5 |
RUN apt-get update && \
|
6 |
-
apt-get install -y curl git ca-certificates lsb-release
|
7 |
|
8 |
-
# Install Node.js
|
9 |
-
RUN curl -fsSL https://deb.nodesource.com/
|
10 |
apt-get install -y nodejs
|
|
|
11 |
# Install pnpm globally
|
12 |
-
RUN
|
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
|
27 |
RUN pnpm run build
|
28 |
|
29 |
-
# Expose port (adjust
|
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
|