Docker within docker privileged mode for web app hosting
Apparently, HF spaces does have plans to supportdocker-compose, as discussed inthis thread.This is an issue, as I want to test if I could deploy an already containerized web solution through Hugging Face, for pure demo purposes - to showcase the web solution and some AI models on medical images.As HF spaces did not supportdocker-compose, I figured I might get around the issue by going for a docker-within-docker approach. However, to rundocker-composeinside theDockerfile, which is required and expected by the HF space for deployment, I’m running into some issues. I became aware of some limitations with said approach. To access and run docker commands from within docker, I will need to launch the original docker container by:docker run -v /var/run/docker.sock:/var/run/docker.sock -ti dockerAs I doubt that HF spaces has this by default, I guess this is not viable. Alternatively, if the original container is spawned in privileged mode, I wouldn’t need to do thedocker.sockapproach:docker run --privileged -d --name dind-test docker:dindBut then again, I doubt HF spaces do any of these. Are there any other workaround I am not seeing?My project is hosted at:huggingface.coDigital Slide Archive: Platform for working with large microscopy images. - a...Discover amazing ML apps made by the community
2023-09-16T20:19:47Z
hi@andrepedthis is very cool! I’m going to loop@XciDand@chris-rannouhere and see if they can tell us if that’s possible.
2023-09-17T19:33:40Z
Note that to deploy locally, you can simply do:git clone https://github.com/andreped/dsa4hf
cd dsa4hf/dsa/
docker-compose pull
DSA_USER=$(id -u):$(id -g) docker-compose upIn essense, this is what I want to get working on HF spaces. If I manage to find a solution to this, there are also other web apps I could do the same fix for, so a workaround to this problem would be great :]