Closed RJGhugo closed 3 months ago
Any updates here please? :) Ended up here as well despite got it to work previously, now back there ending up with "Healthy" status but "Exception: Failed to get bounding box, please check if the 'docker_torchserve' is running and healthy, resp: <Response [500]>" and "Unhealthy" status after that. Did everything quite the same way and probably have almost the same setup
no till now nothing...
I also have this problem .Did you settle this?
Hello folks. So the server initially returns 'healthy' but dies during the request to get the bounding box, then returns 'unhealthy'.
I've only ever encountered this issue when there wasn't enough RAM allotted to the docker. If you alot at least 16gb (or higher if you can) and it's still failing, then there's a different issue that's causing torchserve to die. In that case you'll need to take it up with the torchserve team, as I can't troubleshoot it for you.
Hello,
allocated 48GB to the VW (18.04 LTS) and 40 GB to Docker.
sudo docker run --name docker_torchserve --memory="40G" -p 8080:8080 -p 8081:8081 docker_torchserve
Still the same error...
If increasing memory fails, in dockerfile RUN pip install torch==2.0.0 -> RUN pip install torch==2.0.0 torchvision==0.15.1 Change and test. (If it doesn't work, reinstall docker desktop first and test it)
This was conducted in the test environment below. -windows 10 -ram 64gb
Thanks very much. That was it!
cd ~/AnimatedDrawings/torchserve
nano Dockerfile
RUN pip install torch==2.0.0 torchvision==0.15.1
As soon as I have a resonable figure I shall post it in the Fediverse with #FAIRAnimatedDrawings.
Error while runing GARLIC
python image_to_animation.py drawings/garlic.png garlic_out Traceback (most recent call last): File "image_to_animation.py", line 41, in <module> image_to_animation(img_fn, char_anno_dir, motion_cfg_fn, retarget_cfg_fn) File "image_to_animation.py", line 19, in image_to_animation image_to_annotations(img_fn, char_anno_dir) File "/home/xxx/AnimatedDrawings/examples/image_to_annotations.py", line 53, in image_to_annotations raise Exception(f"Failed to get bounding box, please check if the 'docker_torchserve' is running and healthy, resp: {resp}") Exception: Failed to get bounding box, please check if the 'docker_torchserve' is running and healthy, resp: <Response [500]>
Setup
Arch Linux Gnome Boxes with Ubuntu (18.04 and/or 23.10)
Installation inside Gnome Boxes
sudo apt update sudo apt upgrade sudo apt install spice-webdavd spice-client-gtk
conda
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh
~/miniconda3/bin/conda init bash
Animation
sudo apt install git
git clone https://github.com/facebookresearch/AnimatedDrawings.git
conda create --name animated_drawings python=3.8.13
conda activate animated_drawings
cd AnimatedDrawings
pip install -e .
Basic Test
works on 18.04, but not on 23.10
conda activate animated_drawings
cd ~/AnimatedDrawings/
python
from animated_drawings import render
render.start('./examples/config/mvc/interactive_window_example.yaml')
Docker
Docker Desktop
https://docs.docker.com/desktop/install/ubuntu/
Add Docker's official GPG key:
sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc
Add the repository to Apt sources:
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Test
sudo docker run hello-world
Install Animated Drawings
cd ~/AnimatedDrawings/torchserve
nano Dockerfile #RUN pip install torch==2.0.0 RUN pip install torch==2.0.1 #RUN pip install torch RUN mim install mmcv-full==1.7.0 #RUN mim install mmcv-full
sudo docker build -t docker_torchserve .
sudo docker run -d --name docker_torchserve -p 8080:8080 -p 8081:8081 docker_torchserve
sudo docker run --name docker_torchserve --memory="32G" -p 8080:8080 -p 8081:8081 docker_torchserve
curl http://localhost:8080/ping
Test
fails on 18.04 and 23.10
conda activate animated_drawings
cd ~/AnimatedDrawings/examples
python image_to_animation.py drawings/garlic.png garlic_out