anthropics / anthropic-quickstarts

A collection of projects designed to help developers quickly get started with building deployable applications using the Anthropic API
MIT License
6.92k stars 1.03k forks source link

[computer use] Entrypoint change to allow restart #173

Open yan-hic opened 5 days ago

yan-hic commented 5 days ago

Sometimes you want to stop/restart the container to not loose post-run changes to it i.e. installed s/w, firefox addons, tool tweaking, ... Currently this is not possible as Xvfb will already have started and save state in a lockfile.

Workaround is to add the following at the beginning of entrypoint.sh: sudo rm -fr /tmp/.X* Not elegant and incomplete but does the job.

madtank commented 1 day ago

I've been struggling to figure out how I can restart my container once stopped, this worked for me. Thanks!

madtank commented 1 day ago

If you have an existing container you want to start, after you edit this file, make sure to set the permissions back, otherwise the container will not even attempt to start. I was able to make this update in Docker Desktop, and it solved my issue of not being able to restart.

image