Error pulling a Docker image
Make sure
- you’ve provided credentials to your private docker registry. See our docs for details
- your project is owned by the organization. Personal projects don’t have access to private repositories defined on the organisation level. You can transfer the project ownership under the project’s settings -> administration tab
How can I force Valohai to fetch a new version of my Docker image?
By default, Valohai will cache the Docker image and input files on the machine. You can view the execution’s logs to see if cached files are being used.
There are a few special environment variables that you can set to clear the cache on the machine when launching a new execution.
VH_NO_DATA_CACHE
Setting this to a true value (1, yes, true) will have the execution agent ignore any pre-existing cached data. This is useful if you have reused the same URL for a given datum (which, for reproducibility reasons, you should not generally do). The datum will still be written to the agent machine’s local cache.
VH_NO_IMAGE_CACHE
Setting this to a true value (1, yes, true) will have the execution agent ignore existing Docker images and force pulling them anew from the source.
VH_CLEAN
Setting this to a true value (1, yes, true) will have the execution agent forcibly clean all Docker images and cached data off the agent machine before and after the execution. This will take additional time.
Does Valohai use the root user inside the Docker container?
Yes. By default Valohai uses root but your custom Docker image can override this via USER
in your Dockerfile.
Can I use a custom ENTRYPOINT and CMD in my Docker image?
It is not possible to use custom ENTRYPOINT and CMD.
To be more precise, neither of them have an effect when ran in Valohai. The design is such that only the step command(s) and nothing else will be executed. The –entrypoint will be explicitly overridden with an empty value and CMD will be replaced by the Valohai execution commands.
Can I use a custom container run options?
It’s not possible to pass custom docker run
arguments or change the entry point.
A fundamental design concept of Valohai is that whatever happens inside the container is up to the user, and Valohai handles everything that happens outside of the container.
Valohai executes docker run
with a set of additional configuration options that make Valohai work the way it works. Most of this configuration is dependent on the machine, its resource availability, and depending what kind of execution/task/pipeline it is.
- Most of these configurations are quite essential to Valohai, and there are some optional settings like when to use a temp disk if available, etc., and a set of environment variables.
- There are also a set of additional parameters if we need to launch a virtual display with the container etc.
- If we allow users to pass their own
docker run
we’d have to do merging between Valohai arguments and then whatever the user wants to do — and make sure we don’t have conflicts etc.
You can pass parameters to your code, use custom Docker images, mount directories, etc. using Valohai.
Reach out to our support if you have any other cases where you’d need to pass customer docker run
arguments.
Speeding Up Docker with a Pull-Through Cache
At Valohai, we provide a solution to speed up Docker operations in your development environment by setting up a pull-through cache. This system reduces the time required to fetch frequently accessed Docker images from the internet, enhancing efficiency and reducing bandwidth costs.
When to Use This Feature
Consider using the Docker pull-through cache if you:
- Frequently build or update Docker images.
- Experience slow download speeds or time-outs during Docker operations due to network constraints.
- Aim to reduce bandwidth costs and improve Docker image retrieval efficiency.
Requirements
Before implementation, ensure the following:
- Machine Setup: A dedicated machine is required within the same Virtual Private Cloud (VPC) as your worker machines.
- Network Configuration: Network rules must allow traffic from your worker machines to the caching server on the necessary ports. Also, establish secure SSH access from known IPs.
Valohai Environment Setup
To get started with the Docker pull-through cache, please contact us at support@valohai.com. Our team will handle the setup of the environment, configuring Docker as a pull-through cache to ensure optimal performance.
Once everything is ready, you'll experience faster and more reliable Docker operations, enhancing your development workflows.
If you have any issues or further questions, our support team is ready to assist you throughout the process.