WENior commited on
Commit
0e61938
·
verified ·
1 Parent(s): 4dfd187

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # 基础依赖(kiwipiepy 有时需要编译环境;装上更稳)
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ build-essential gcc g++ \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ COPY requirements.txt /app/requirements.txt
11
+ RUN pip install -U pip && pip install --no-cache-dir -r requirements.txt
12
+
13
+ COPY . /app
14
+
15
+ # Gradio 在 Spaces 默认用 7860
16
+ ENV GRADIO_SERVER_NAME=0.0.0.0
17
+ ENV GRADIO_SERVER_PORT=7860
18
+
19
+ CMD ["python", "app.py"]