Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Docker] Some docker images fail at setup on clouds #3706

Closed
romilbhardwaj opened this issue Jun 28, 2024 · 4 comments
Closed

[Docker] Some docker images fail at setup on clouds #3706

romilbhardwaj opened this issue Jun 28, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@romilbhardwaj
Copy link
Collaborator

Repro:

sky launch -c vllm2 --image-id docker:vllm/vllm-openai:latest --cloud gcp

Fails on setup with:

D 06-28 09:46:41 provisioner.py:592] sky.exceptions.CommandError: Command docker exec sky_container /bin/bash -c 'bash --login -c -i '"'"'source ~/.bashrc; export OMP_NUM_THREADS=1 PYTHONWARNINGS=ignore && (sudo apt-get update; sudo apt-get -o DPkg::Options::="--force-confnew" install -y rsync curl wget patch openssh-server python3-pip fuse;)'"'"''  failed with return code 137.
D 06-28 09:46:41 provisioner.py:592] Failed to run docker setup commands.

Note: Same image works on Kubernetes.

Logs aren't useful:

D 06-28 09:44:00 provisioner.py:456] SSH Conection ready for 'vllm2'
I 06-28 09:44:00 provisioner.py:458] Successfully provisioned or found existing instance.
E 06-28 09:46:41 subprocess_utils.py:84] Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
E 06-28 09:46:41 subprocess_utils.py:84] Get:2 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  InRelease [1581 B]
E 06-28 09:46:41 subprocess_utils.py:84] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages [929 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:5 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:6 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:7 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [51.8 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:8 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [2639 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:9 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2238 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:10 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1398 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:11 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [32.2 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1114 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:13 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [2566 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:14 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1974 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Get:15 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [44.7 kB]
E 06-28 09:46:41 subprocess_utils.py:84] Fetched 13.4 MB in 2s (7725 kB/s)
E 06-28 09:46:41 subprocess_utils.py:84] Reading package lists...
E 06-28 09:46:41 subprocess_utils.py:84] Reading package lists...
E 06-28 09:46:41 provisioner.py:591] *** Failed setting up cluster. ***
D 06-28 09:46:41 provisioner.py:592] Stacktrace:
D 06-28 09:46:41 provisioner.py:592] Traceback (most recent call last):
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/provisioner.py", line 585, in post_provision_runtime_setup
D 06-28 09:46:41 provisioner.py:592]     return _post_provision_setup(cloud_name,
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/provisioner.py", line 466, in _post_provision_setup
D 06-28 09:46:41 provisioner.py:592]     docker_user = instance_setup.initialize_docker(
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/instance_setup.py", line 108, in wrapper
D 06-28 09:46:41 provisioner.py:592]     return func(*args, **kwargs)
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/instance_setup.py", line 173, in initialize_docker
D 06-28 09:46:41 provisioner.py:592]     docker_users = _parallel_ssh_with_cache(
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/instance_setup.py", line 153, in _parallel_ssh_with_cache
D 06-28 09:46:41 provisioner.py:592]     return [future.result() for future in results]
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/instance_setup.py", line 153, in <listcomp>
D 06-28 09:46:41 provisioner.py:592]     return [future.result() for future in results]
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/tools/anaconda3/lib/python3.9/concurrent/futures/_base.py", line 446, in result
D 06-28 09:46:41 provisioner.py:592]     return self.__get_result()
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/tools/anaconda3/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
D 06-28 09:46:41 provisioner.py:592]     raise self._exception
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/tools/anaconda3/lib/python3.9/concurrent/futures/thread.py", line 58, in run
D 06-28 09:46:41 provisioner.py:592]     result = self.fn(*self.args, **self.kwargs)
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/metadata_utils.py", line 45, in wrapper
D 06-28 09:46:41 provisioner.py:592]     return function(*args, **kwargs)
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/instance_setup.py", line 87, in retry
D 06-28 09:46:41 provisioner.py:592]     return func(*args, **kwargs)
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/instance_setup.py", line 168, in _initialize_docker
D 06-28 09:46:41 provisioner.py:592]     docker_user = docker_utils.DockerInitializer(docker_config, runner,
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/docker_utils.py", line 278, in initialize
D 06-28 09:46:41 provisioner.py:592]     self._run(
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/provision/docker_utils.py", line 176, in _run
D 06-28 09:46:41 provisioner.py:592]     subprocess_utils.handle_returncode(
D 06-28 09:46:41 provisioner.py:592]   File "/Users/romilb/Romil/Berkeley/Research/sky-experiments/sky/utils/subprocess_utils.py", line 91, in handle_returncode
D 06-28 09:46:41 provisioner.py:592]     raise exceptions.CommandError(returncode, command, format_err_msg,
D 06-28 09:46:41 provisioner.py:592] sky.exceptions.CommandError: Command docker exec sky_container /bin/bash -c 'bash --login -c -i '"'"'source ~/.bashrc; export OMP_NUM_THREADS=1 PYTHONWARNINGS=ignore && (sudo apt-get update; sudo apt-get -o DPkg::Options::="--force-confnew" install -y rsync curl wget patch openssh-server python3-pip fuse;)'"'"''  failed with return code 137.
D 06-28 09:46:41 provisioner.py:592] Failed to run docker setup commands.
@romilbhardwaj
Copy link
Collaborator Author

cc @cblmemo - any ideas here?

@cblmemo
Copy link
Collaborator

cblmemo commented Jul 11, 2024

I tried manually running the docker container on the GCP VM and got the following output. It seems like this docker container has an entrypoint, thus making the argument bash unrecognized. We currently does not support such containers w/ entrypoint. I'm not sure why k8s works well though, maybe there is some special case handling there? Like ignore the entrypoint?

$ docker run --name sky4 -it -e LC_ALL=C.UTF-8 -e LANG=C.UTF-8 --ulimit nofile=1048576:1048576 --shm-size="10759170048.0b"
 --net=host --cap-add=SYS_ADMIN --device=/dev/fuse --security-opt=apparmor:unconfined vllm/vllm-openai:latest bash
usage: api_server.py [-h] [--host HOST] [--port PORT] [--uvicorn-log-level {debug,info,warning,error,critical,trace}] [--allow-credentials]
                     [--allowed-origins ALLOWED_ORIGINS] [--allowed-methods ALLOWED_METHODS] [--allowed-headers ALLOWED_HEADERS] [--api-key API_KEY]
                     [--lora-modules LORA_MODULES [LORA_MODULES ...]] [--chat-template CHAT_TEMPLATE] [--response-role RESPONSE_ROLE] [--ssl-keyfile SSL_KEYFILE]
                     [--ssl-certfile SSL_CERTFILE] [--ssl-ca-certs SSL_CA_CERTS] [--ssl-cert-reqs SSL_CERT_REQS] [--root-path ROOT_PATH] [--middleware MIDDLEWARE]
                     [--model MODEL] [--tokenizer TOKENIZER] [--skip-tokenizer-init] [--revision REVISION] [--code-revision CODE_REVISION]
                     [--tokenizer-revision TOKENIZER_REVISION] [--tokenizer-mode {auto,slow}] [--trust-remote-code] [--download-dir DOWNLOAD_DIR]
                     [--load-format {auto,pt,safetensors,npcache,dummy,tensorizer,bitsandbytes}] [--dtype {auto,half,float16,bfloat16,float,float32}]
                     [--kv-cache-dtype {auto,fp8,fp8_e5m2,fp8_e4m3}] [--quantization-param-path QUANTIZATION_PARAM_PATH] [--max-model-len MAX_MODEL_LEN]
                     [--guided-decoding-backend {outlines,lm-format-enforcer}] [--distributed-executor-backend {ray,mp}] [--worker-use-ray]
                     [--pipeline-parallel-size PIPELINE_PARALLEL_SIZE] [--tensor-parallel-size TENSOR_PARALLEL_SIZE]
                     [--max-parallel-loading-workers MAX_PARALLEL_LOADING_WORKERS] [--ray-workers-use-nsight] [--block-size {8,16,32}] [--enable-prefix-caching]
                     [--disable-sliding-window] [--use-v2-block-manager] [--num-lookahead-slots NUM_LOOKAHEAD_SLOTS] [--seed SEED] [--swap-space SWAP_SPACE]
                     [--gpu-memory-utilization GPU_MEMORY_UTILIZATION] [--num-gpu-blocks-override NUM_GPU_BLOCKS_OVERRIDE]
                     [--max-num-batched-tokens MAX_NUM_BATCHED_TOKENS] [--max-num-seqs MAX_NUM_SEQS] [--max-logprobs MAX_LOGPROBS] [--disable-log-stats]
                     [--quantization {aqlm,awq,deepspeedfp,fp8,marlin,gptq_marlin_24,gptq_marlin,gptq,squeezellm,compressed-tensors,bitsandbytes,None}]
                     [--rope-scaling ROPE_SCALING] [--rope-theta ROPE_THETA] [--enforce-eager] [--max-context-len-to-capture MAX_CONTEXT_LEN_TO_CAPTURE]
                     [--max-seq-len-to-capture MAX_SEQ_LEN_TO_CAPTURE] [--disable-custom-all-reduce] [--tokenizer-pool-size TOKENIZER_POOL_SIZE]
                     [--tokenizer-pool-type TOKENIZER_POOL_TYPE] [--tokenizer-pool-extra-config TOKENIZER_POOL_EXTRA_CONFIG] [--enable-lora] [--max-loras MAX_LORAS]
                     [--max-lora-rank MAX_LORA_RANK] [--lora-extra-vocab-size LORA_EXTRA_VOCAB_SIZE] [--lora-dtype {auto,float16,bfloat16,float32}]
                     [--long-lora-scaling-factors LONG_LORA_SCALING_FACTORS] [--max-cpu-loras MAX_CPU_LORAS] [--fully-sharded-loras]
                     [--device {auto,cuda,neuron,cpu,openvino,tpu,xpu}] [--scheduler-delay-factor SCHEDULER_DELAY_FACTOR] [--enable-chunked-prefill]
                     [--speculative-model SPECULATIVE_MODEL] [--num-speculative-tokens NUM_SPECULATIVE_TOKENS]
                     [--speculative-draft-tensor-parallel-size SPECULATIVE_DRAFT_TENSOR_PARALLEL_SIZE] [--speculative-max-model-len SPECULATIVE_MAX_MODEL_LEN]
                     [--speculative-disable-by-batch-size SPECULATIVE_DISABLE_BY_BATCH_SIZE] [--ngram-prompt-lookup-max NGRAM_PROMPT_LOOKUP_MAX]
                     [--ngram-prompt-lookup-min NGRAM_PROMPT_LOOKUP_MIN] [--spec-decoding-acceptance-method {rejection_sampler,typical_acceptance_sampler}]
                     [--typical-acceptance-sampler-posterior-threshold TYPICAL_ACCEPTANCE_SAMPLER_POSTERIOR_THRESHOLD]
                     [--typical-acceptance-sampler-posterior-alpha TYPICAL_ACCEPTANCE_SAMPLER_POSTERIOR_ALPHA] [--model-loader-extra-config MODEL_LOADER_EXTRA_CONFIG]
                     [--preemption-mode PREEMPTION_MODE] [--served-model-name SERVED_MODEL_NAME [SERVED_MODEL_NAME ...]]
                     [--qlora-adapter-name-or-path QLORA_ADAPTER_NAME_OR_PATH] [--otlp-traces-endpoint OTLP_TRACES_ENDPOINT] [--engine-use-ray] [--disable-log-requests]
                     [--max-log-len MAX_LOG_LEN]
api_server.py: error: unrecognized arguments: bash

@Michaelvll Michaelvll added the bug Something isn't working label Aug 15, 2024
@Michaelvll
Copy link
Collaborator

We should check if passing --entrypoint to the command works, which should be able to override the specified ENTRYPOINT in the docker image.

@Michaelvll
Copy link
Collaborator

This should be fixed by #3867

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants