cacode commited on
Commit
6c5af6a
·
verified ·
1 Parent(s): 3a78b95

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1 \
5
+ PIP_NO_CACHE_DIR=1 \
6
+ PORT=7860
7
+
8
+ WORKDIR /app
9
+
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
+ build-essential \
12
+ libpq-dev \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # 如果你的项目是 requirements.txt
16
+ COPY requirements.txt /app/requirements.txt
17
+ RUN pip install -r /app/requirements.txt
18
+
19
+ # 复制项目
20
+ COPY . /app
21
+
22
+ # 启动脚本
23
+ RUN chmod +x /app/start.sh
24
+
25
+ CMD ["/app/start.sh"]