This commit is contained in:
yifeng.wang
2025-03-17 16:10:59 +08:00
parent e33a23d135
commit 7186de7d3f
2 changed files with 8 additions and 7 deletions

View File

@@ -16,7 +16,7 @@ WORKDIR /app
# 安装系统依赖合并为一个RUN命令减少层数
RUN apt-get update && apt-get install -y --no-install-recommends \
curl git ffmpeg libsm6 libxext6 xvfb xauth x11-utils \
build-essential python3-dev \
build-essential python3-dev vim\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
@@ -41,6 +41,7 @@ COPY assets/ ./assets/
COPY README_zh.md .
# 创建启动脚本
RUN echo '#!/bin/bash\nxvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" python "$@"' > /usr/local/bin/xvfb-python && \
chmod +x /usr/local/bin/xvfb-python

View File

@@ -1,13 +1,13 @@
services:
owl:
# Option 1: Use pre-built image from Docker Hub
image: mugglejinx/owl:latest
# image: mugglejinx/owl:latest
# Option 2: Build image locally
# Uncomment the following lines and comment out the 'image' line above to build locally
# build:
# context: ..
# dockerfile: .container/Dockerfile
build:
context: ..
dockerfile: .container/Dockerfile
volumes:
# 挂载.env文件方便配置API密钥
@@ -23,8 +23,8 @@ services:
- PYTHONDONTWRITEBYTECODE=1
- PYTHONUNBUFFERED=1
- TERM=xterm-256color
- GRADIO_SERVER_NAME="0.0.0.0"
- GRADIO_SERVER_PORT="7860"
- GRADIO_SERVER_NAME=0.0.0.0
- GRADIO_SERVER_PORT=7860
ports:
- "7860:7860"
stdin_open: true