FECUOY commited on
Commit
d73f289
·
1 Parent(s): 4c41b3d

Add Dockerfile for Hugging Face Spaces

Browse files
Files changed (1) hide show
  1. Dockerfile +36 -0
Dockerfile ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:22-slim
2
+
3
+ # Install system dependencies for sandbox and database
4
+ RUN apt-get update && apt-get install -y \
5
+ python3 \
6
+ python3-pip \
7
+ curl \
8
+ git \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Install Python dependencies
12
+ RUN pip3 install chromadb --break-system-packages
13
+
14
+ WORKDIR /app
15
+
16
+ # Copy package files
17
+ COPY package.json pnpm-lock.yaml ./
18
+
19
+ # Install pnpm and dependencies
20
+ RUN npm install -g pnpm && pnpm install
21
+
22
+ # Copy all project files
23
+ COPY . .
24
+
25
+ # Build the frontend
26
+ RUN pnpm build
27
+
28
+ # Expose the port (Hugging Face Spaces default is 7860)
29
+ EXPOSE 7860
30
+
31
+ # Set environment variables
32
+ ENV PORT=7860
33
+ ENV NODE_ENV=production
34
+
35
+ # Start the application
36
+ CMD ["pnpm", "start"]