launch_configuration
property.
launch_configuration
object.
The launch_configuration.type
property must be set to docker
and an additional docker_configuration
object must be specified.
In the docker_configuration
object, we specify image
as the image that we want to run and args
as any arguments that should be passed to the container image.
This API call will spin up the base A6000 VM and, once the VM is active
, pull and launch the docker container. We can get the status and IP address of the instance by calling the Instances API.
status
returned by the Instances API call is the status of the VM instance and not the status of the container. The status of the container is not surfaced through Shadeform’s API.Container Registry
row in the table and click on Set Up
.
envs
property.
In the example below, we are passing in the HUGGING_FACE_HUB_TOKEN
environment variable which is needed by vLLM to access private HuggingFace repos.
volume_mounts
property.
Using volume_mounts
is the equivalent of using the -v
flag in the Docker cli.
--network=host
which means that the ports of the container will be directly mapped to the VM.
Therefore, if the container runs on port 8000, then accessing the VM’s port 8000 will reach the container.
If you want the container port to be mapped to a different VM port, you can configure port_mappings
like in the example below.
--ipc="host"
for shared memory. If you would like to limit shared memory, you can configure the property like in the example below: