From 79a68aa271d0c8e0c345c55c40905efc556fe16c Mon Sep 17 00:00:00 2001 From: Wolfram Ravenwolf <52386626+WolframRavenwolf@users.noreply.github.com> Date: Fri, 25 Oct 2024 14:14:55 +0200 Subject: [PATCH 1/2] Create docker-compose.yml Add a Docker Compose file. A Compose file provides significant advantages even for single-container deployments: It offers a clean, version-controlled YAML configuration that's more readable and maintainable than lengthy docker run commands with multiple flags. The file format eliminates the need to remember complex command-line arguments and enables quick modifications to container settings. This implementation uses Docker volumes, the recommended approach for persisting container data. Unlike bind mounts, volumes operate independently of the host machine's directory structure and operating system. To use a bind mount instead, users can uncomment the first entry under "volumes:" and comment out the subsequent lines. The "restart: unless-stopped" directive remains commented out by default, giving users full control over container execution (stopped containers won't automatically restart). Users can uncomment this line to ensure the container runs permanently. --- computer-use-demo/docker-compose.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 computer-use-demo/docker-compose.yml diff --git a/computer-use-demo/docker-compose.yml b/computer-use-demo/docker-compose.yml new file mode 100644 index 00000000..0a5ddc54 --- /dev/null +++ b/computer-use-demo/docker-compose.yml @@ -0,0 +1,17 @@ +services: + computeruse: + environment: + ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY} + image: ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest + ports: + - 5900:5900 + - 8501:8501 + - 6080:6080 + - 8080:8080 + #restart: unless-stopped + volumes: + #- ${HOME:-.}/.anthropic:/home/computeruse/.anthropic + - computeruse:/home/computeruse/.anthropic + +volumes: + computeruse: From 1429bd73ce4702ba59abd1168bd909c23b510ed9 Mon Sep 17 00:00:00 2001 From: Wolfram Ravenwolf <52386626+WolframRavenwolf@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:50:45 +0200 Subject: [PATCH 2/2] Update docker-compose.yml --- computer-use-demo/docker-compose.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/computer-use-demo/docker-compose.yml b/computer-use-demo/docker-compose.yml index 0a5ddc54..9cd16a2a 100644 --- a/computer-use-demo/docker-compose.yml +++ b/computer-use-demo/docker-compose.yml @@ -1,13 +1,15 @@ services: computeruse: + container_name: computeruse environment: ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY} + hostname: computeruse image: ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest ports: - - 5900:5900 - - 8501:8501 - - 6080:6080 - - 8080:8080 + - 5900:5900 # Direct VNC + - 6080:6080 # Desktop View + - 8080:8080 # Combined Interface + - 8501:8501 # Agent Chat #restart: unless-stopped volumes: #- ${HOME:-.}/.anthropic:/home/computeruse/.anthropic