rb125 commited on
Commit
533f4dd
·
1 Parent(s): 59306a7

add Dockerfile for HF Spaces deployment

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ RUN apt-get update && apt-get install -y --no-install-recommends curl && \
4
+ curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
5
+ apt-get install -y --no-install-recommends nodejs && \
6
+ rm -rf /var/lib/apt/lists/*
7
+
8
+ WORKDIR /app
9
+
10
+ COPY requirements.txt .
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ COPY storage/package.json storage/package-lock.json* storage/
14
+ RUN cd storage && npm install --production 2>/dev/null || true
15
+
16
+ COPY . .
17
+
18
+ EXPOSE 7860
19
+
20
+ CMD ["python", "-m", "uvicorn", "server.api:app", "--host", "0.0.0.0", "--port", "7860"]