This message was deleted.
# ask-for-help
s
This message was deleted.
a
Hey @Vivien Robert 👋 Is it to use custom image to build a bento instead of
<http://docker.io|docker.io>
? • If thats the case, then
bentofile
has an option to use custom image as such https://docs.bentoml.org/en/latest/guides/containerization.html#custom-base-image
Copy code
docker:
    base_image: "my_custom_image:latest"
    setup_script: "./setup.sh"
v
Hello not exactly although that would be one (annoying) solution, I would rather avoid that solution. Bento determines which image to use based on options in the bentofile (cuda, conda, python version, ...), I would like bento to still use the images it determines is the best but fetch it from
public.ecr.aws/docker/library
instead of
<http://docker.io/library|docker.io/library>
. One workaround would be to basically rewrite/copy the code that determines which image to use and add
public.ecr.aws/docker/library
then give it as a base_image but I'd rather not maintain that if it can be avoided.
j
@Vivien Robert Are you using
bentoml containerize
? It will just call the installed
docker
to build images, thus you can just change the default registry-mirrors of your docker. Below is the how-to generated by ChatGPT: You can configure Docker to use the public.ecr.aws/docker prefix instead of docker.io as the default image registry by following these steps: 1. Open the Docker daemon configuration file by running
sudo nano /etc/docker/daemon.json
in your terminal. 2. Add the following lines to the file:
Copy code
复制代码
{
  "registry-mirrors": ["<https://public.ecr.aws>"],
  "insecure-registries": [],
  "debug": true,
  "experimental": true
}
1. Save and exit the file. 2. Restart the Docker daemon by running
sudo systemctl restart docker
. After completing these steps, Docker should use public.ecr.aws/docker as the default image registry. You can verify this by running
docker pull public.ecr.aws/<your-image-name>
and seeing if it successfully pulls the image.
👍 1