diff --git a/.container/Dockerfile b/.container/Dockerfile index 6131968..3016502 100644 --- a/.container/Dockerfile +++ b/.container/Dockerfile @@ -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 diff --git a/.container/docker-compose.yml b/.container/docker-compose.yml index b474341..4d65094 100644 --- a/.container/docker-compose.yml +++ b/.container/docker-compose.yml @@ -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