mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-03-27 03:23:48 +08:00
python脚本
This commit is contained in:
committed by
jiahao.he@vtradex.com
parent
87be1f637c
commit
fe62ae4d5e
21
script/docker/localModels/Dockerfile
Normal file
21
script/docker/localModels/Dockerfile
Normal file
@@ -0,0 +1,21 @@
|
||||
# 使用官方 Python 作为基础镜像
|
||||
FROM python:3.8-slim
|
||||
|
||||
# 设置工作目录为 /app
|
||||
WORKDIR /app
|
||||
|
||||
# 复制当前目录下的所有文件到 Docker 容器的 /app 目录
|
||||
COPY . /app
|
||||
|
||||
# 安装应用依赖
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 暴露 Flask 应用使用的端口
|
||||
EXPOSE 5000
|
||||
|
||||
# 设置环境变量
|
||||
ENV FLASK_APP=app.py
|
||||
ENV FLASK_RUN_HOST=0.0.0.0
|
||||
|
||||
# 启动 Flask 应用
|
||||
CMD ["flask", "run", "--host=0.0.0.0"]
|
||||
Reference in New Issue
Block a user