diff --git a/.container/Dockerfile b/.container/Dockerfile index 7054876..2393ed9 100644 --- a/.container/Dockerfile +++ b/.container/Dockerfile @@ -15,13 +15,14 @@ WORKDIR /app # 安装系统依赖(合并为一个RUN命令减少层数) RUN apt-get update && apt-get install -y --no-install-recommends \ curl git ffmpeg libsm6 libxext6 xvfb xauth x11-utils \ - gcc python3-dev \ + build-essential python3-dev \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* # 复制项目文件 COPY owl/ ./owl/ COPY licenses/ ./licenses/ COPY assets/ ./assets/ +COPY examples/ ./examples/ COPY README.md . COPY README_zh.md . COPY pyproject.toml . diff --git a/.container/docker-compose.yml b/.container/docker-compose.yml index 0f6762c..e099627 100644 --- a/.container/docker-compose.yml +++ b/.container/docker-compose.yml @@ -1,9 +1,14 @@ services: owl: + # Option 1: Use pre-built image from Docker Hub image: mugglejinx/owl:latest - build: - context: .. - dockerfile: .container/Dockerfile + + # Option 2: Build image locally + # Uncomment the following lines and comment out the 'image' line above to build locally + # build: + # context: .. + # dockerfile: .container/Dockerfile + volumes: # 挂载.env文件,方便配置API密钥 - ../owl/.env:/app/owl/.env diff --git a/README.md b/README.md index ddf6021..89e93db 100644 --- a/README.md +++ b/README.md @@ -278,10 +278,8 @@ cd owl cp owl/.env_template owl/.env # Edit the .env file and fill in your API keys -# Option 1: Using pre-built docker image -docker run -it --rm --env-file owl/.env mugglejinx/owl - -# Option 2: Using docker-compose directly +# Option 1: Using docker-compose directly +# (By default it's using pre-built online image, you can also check the docker-compose.yml for building locally) cd .container docker-compose up -d @@ -297,7 +295,7 @@ playwright install-deps #run example demo script xvfb-python examples/run.py -# Option 3: Build and run using the provided scripts +# Option 2: Build and run using the provided scripts cd .container chmod +x build_docker.sh ./build_docker.sh