[
{
"Id": "c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b",
"Created": "2024-08-04T02:43:24.909341103Z",
"Path": "/startup.sh",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 1308978,
"ExitCode": 0,
"Error": "",
"StartedAt": "2024-08-14T11:31:49.644923079Z",
"FinishedAt": "2024-08-14T11:31:49.206669276Z"
},
"Image": "sha256:629ec4df10b1d0202f30c9f379dea586ead067722597cedb0f3ebb9eb3337065",
"ResolvConfPath": "/var/lib/docker/containers/c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b/hostname",
"HostsPath": "/var/lib/docker/containers/c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b/hosts",
"LogPath": "/var/lib/docker/containers/c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b/c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b-json.log",
"Name": "/lmdeploy",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null,
"HostConfig": {
"Binds": [
"/home/hlj/.cache/huggingface:/root/.cache/huggingface"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {
"max-file": "3",
"max-size": "10m"
}
},
"NetworkMode": "bridge",
"PortBindings": {
"23333/tcp": [
{
"HostIp": "",
"HostPort": "23333"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"ConsoleSize": [
60,
121
],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "private",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "host",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": [
"label=disable"
],
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "nvidia",
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": [],
"BlkioDeviceWriteBps": [],
"BlkioDeviceReadIOps": [],
"BlkioDeviceWriteIOps": [],
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": [
{
"Driver": "",
"Count": -1,
"DeviceIDs": null,
"Capabilities": [
[
"gpu"
]
],
"Options": {}
}
],
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": [],
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware",
"/sys/devices/virtual/powercap"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
},
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/ddf24cd9ee208b8219020834967b5e5cf84f570879a9ddd7cefaa5968db598b2-init/diff:/var/lib/docker/overlay2/kd1a3js9cf8p1x3dih4oqksay/diff:/var/lib/docker/overlay2/e83a275c474b137f32aeec2d8b0835ddf5ed8ecd3671d7d83034b9ce62bd42e1/diff:/var/lib/docker/overlay2/1e389356a5fc4a57d53fbb5f806fb7ae294d0fb9cf32797b541b4756b309d70e/diff:/var/lib/docker/overlay2/da8f6d57b66412e24313af526b34b030be59fbe69d58d978bfc8910fb0a02768/diff:/var/lib/docker/overlay2/22a01998c4071857ea37a948e3aea91ffd7839f0cee89f78167b2d16bf862dbe/diff:/var/lib/docker/overlay2/0edeaba0eacef4e0ddc86dda01e4675257701cb12546b4d0ece8509313193420/diff:/var/lib/docker/overlay2/1bdd123142274c8dd7439373506bc3a13b997803ae1f91e4ca1a4f7b42f747e6/diff:/var/lib/docker/overlay2/b8add21d81efb9c7ac49e96cea14143b5c1e44fcafbc4ade08040039a54cf794/diff:/var/lib/docker/overlay2/c550471aadac0dd9cf61d894cf0c7ba4f194e44b103617610048dd57243778af/diff:/var/lib/docker/overlay2/d1353c33022ef4af2f85de516e6656201cdf13e66b32630a9e9450883181bd41/diff:/var/lib/docker/overlay2/e41238625eb790dde7e2e83c4679f7b0e473eaf8e5d3adbfd098b273bdb210b9/diff:/var/lib/docker/overlay2/2144bef9db48678df41a01bd901a7b7ddd282ace8ceb902910d3d5152a00645f/diff:/var/lib/docker/overlay2/4c2f9582f9a15ca6626af7337211304f11f3e6d23e7f0758530245a50d220078/diff:/var/lib/docker/overlay2/abc505d36333267f450108bd96c00ac5ff1e128c260e61e7997da2be301a0d51/diff:/var/lib/docker/overlay2/62681593678b2b8fda5b477cccb9c7c65ab998c72b0206af834f36fb8cc756ef/diff:/var/lib/docker/overlay2/010d7cb67f6ca5714671338cca64799957ef1e4e955a0ec2062d623a0f21ac45/diff:/var/lib/docker/overlay2/a4c223bc609c7c2b6f480c31ade268fba8a1c186ab9401e3132a38ebf4bc271c/diff:/var/lib/docker/overlay2/b563a8c0ff49d555df389db0bb2495ba402d6847491f756c7fa03589bf4569fe/diff:/var/lib/docker/overlay2/a88230089aad72f7fb7afeb1a2ab108aa78e5a88cc1207e7c3f5fe377fa62c71/diff:/var/lib/docker/overlay2/809390ce9fd3b8ea936f6262068ceeee0b337a9e46c297b22850f516c4f6fc36/diff:/var/lib/docker/overlay2/49b671d21d41637d8c448b6d30ab8a26e45fcd89ef427bb015053c2a99d872bb/diff:/var/lib/docker/overlay2/fcee4f32a58f9552a4fefc701ff02e3d0afe71b2acd013e3d8340b322bbbe778/diff:/var/lib/docker/overlay2/3f38c8a89ef97cba50090290c7805db38f1656b11665a8b60c99d020d3a5af7e/diff:/var/lib/docker/overlay2/808d9a4cb41fd6b70a13bec963e8082cb02a01657881baedff0d0ee69f44869f/diff:/var/lib/docker/overlay2/4cee062cf5bef4a43685e9e85531c20fb8b9cdfcbca79ecebf432ca442f3e499/diff:/var/lib/docker/overlay2/f8a3e6806a1464a4905f7a0aa7bcf25333e18f9ad2ddb56a9e0001bd8792f28e/diff:/var/lib/docker/overlay2/1cd44855a28cdd0506b113fd73c296a8761be0253d6fe6ca1d9db94b005b9f7b/diff:/var/lib/docker/overlay2/31d1b514bb95906f8d3106674f16472703e942bec3796162ace45fc36141304c/diff:/var/lib/docker/overlay2/9fdf9b9d162ffa05f103c66464ff92ed89e8d38ac51c7c759540747d09d79d37/diff:/var/lib/docker/overlay2/02579a706091284489d97589cca37a33e2d34839030940118eb4241921f144ce/diff",
"MergedDir": "/var/lib/docker/overlay2/ddf24cd9ee208b8219020834967b5e5cf84f570879a9ddd7cefaa5968db598b2/merged",
"UpperDir": "/var/lib/docker/overlay2/ddf24cd9ee208b8219020834967b5e5cf84f570879a9ddd7cefaa5968db598b2/diff",
"WorkDir": "/var/lib/docker/overlay2/ddf24cd9ee208b8219020834967b5e5cf84f570879a9ddd7cefaa5968db598b2/work"
},
"Name": "overlay2"
},
"Mounts": [
{
"Type": "bind",
"Source": "/home/hlj/.cache/huggingface",
"Destination": "/root/.cache/huggingface",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
],
"Config": {
"Hostname": "c2496d852ee3",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": true,
"AttachStderr": true,
"ExposedPorts": {
"23333/tcp": {}
},
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"HUGGING_FACE_HUB_TOKEN=" ,
"PATH=/opt/py38/bin:/opt/tritonserver/bin:/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ucx/bin",
"CUDA_VERSION=11.8.0.065",
"CUDA_DRIVER_VERSION=520.61.05",
"CUDA_CACHE_DISABLE=1",
"NVIDIA_REQUIRE_JETPACK_HOST_MOUNTS=",
"_CUDA_COMPAT_PATH=/usr/local/cuda/compat",
"ENV=/etc/shinit_v2",
"BASH_ENV=/etc/bash.bashrc",
"SHELL=/bin/bash",
"NVIDIA_REQUIRE_CUDA=cuda>=9.0",
"NCCL_VERSION=2.15.5",
"CUBLAS_VERSION=11.11.3.6",
"CUFFT_VERSION=10.9.0.58",
"CURAND_VERSION=10.3.0.86",
"CUSPARSE_VERSION=11.7.5.86",
"CUSOLVER_VERSION=11.4.1.48",
"CUTENSOR_VERSION=1.6.1.5",
"NPP_VERSION=11.8.0.86",
"NVJPEG_VERSION=11.9.0.86",
"CUDNN_VERSION=8.7.0.84",
"TRT_VERSION=8.5.1.7",
"TRTOSS_VERSION=22.12",
"NSIGHT_SYSTEMS_VERSION=2022.4.2.1",
"NSIGHT_COMPUTE_VERSION=2022.3.0.22",
"DALI_VERSION=1.20.0",
"DALI_BUILD=6562491",
"POLYGRAPHY_VERSION=0.43.1",
"TRANSFORMER_ENGINE_VERSION=0.3",
"LD_LIBRARY_PATH=/opt/tritonserver/lib:/opt/tritonserver/backends/onnxruntime:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64",
"NVIDIA_VISIBLE_DEVICES=all",
"NVIDIA_DRIVER_CAPABILITIES=compute,utility,video",
"NVIDIA_PRODUCT_NAME=Triton Server",
"GDRCOPY_VERSION=2.3",
"HPCX_VERSION=2.13",
"MOFED_VERSION=5.4-rdmacore36.0",
"OPENUCX_VERSION=1.14.0",
"OPENMPI_VERSION=4.1.4",
"RDMACORE_VERSION=36.0",
"OPAL_PREFIX=/opt/hpcx/ompi",
"OMPI_MCA_coll_hcoll_enable=0",
"LIBRARY_PATH=/usr/local/cuda/lib64/stubs:",
"TRITON_SERVER_VERSION=2.29.0",
"NVIDIA_TRITON_SERVER_VERSION=22.12",
"TF_ADJUST_HUE_FUSED=1",
"TF_ADJUST_SATURATION_FUSED=1",
"TF_ENABLE_WINOGRAD_NONFUSED=1",
"TF_AUTOTUNE_THRESHOLD=2",
"TRITON_SERVER_GPU_ENABLED=1",
"TRITON_SERVER_USER=triton-server",
"DEBIAN_FRONTEND=noninteractive",
"TCMALLOC_RELEASE_RATE=200",
"DCGM_VERSION=2.2.9",
"NVIDIA_BUILD_ID=50109463",
"NCCL_LAUNCH_MODE=GROUP",
"TRITON_PTXAS_PATH=/usr/local/cuda/bin/ptxas"
],
"Cmd": null,
"Image": "lmdeploy:1.0",
"Volumes": null,
"WorkingDir": "/opt/lmdeploy",
"Entrypoint": [
"/startup.sh"
],
"OnBuild": null,
"Labels": {
"com.amazonaws.sagemaker.capabilities.accept-bind-to-port": "true",
"com.amazonaws.sagemaker.capabilities.multi-models": "true",
"com.nvidia.build.id": "50109463",
"com.nvidia.build.ref": "1a651ccb23c8f4416b5540653b207154a531194d",
"com.nvidia.cublas.version": "11.11.3.6",
"com.nvidia.cuda.version": "9.0",
"com.nvidia.cudnn.version": "8.7.0.84",
"com.nvidia.cufft.version": "10.9.0.58",
"com.nvidia.curand.version": "10.3.0.86",
"com.nvidia.cusolver.version": "11.4.1.48",
"com.nvidia.cusparse.version": "11.7.5.86",
"com.nvidia.cutensor.version": "1.6.1.5",
"com.nvidia.nccl.version": "2.15.5",
"com.nvidia.npp.version": "11.8.0.86",
"com.nvidia.nsightcompute.version": "2022.3.0.22",
"com.nvidia.nsightsystems.version": "2022.4.2.1",
"com.nvidia.nvjpeg.version": "11.9.0.86",
"com.nvidia.tensorrt.version": "8.5.1.7",
"com.nvidia.tensorrtoss.version": "22.12",
"com.nvidia.tritonserver.version": "2.29.0",
"com.nvidia.volumes.needed": "nvidia_driver"
}
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "209975bf9949fed38210ded62b87b4487f78391ab994bb7e572ba9ed2dada380",
"SandboxKey": "/var/run/docker/netns/209975bf9949",
"Ports": {
"23333/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "23333"
},
{
"HostIp": "::",
"HostPort": "23333"
}
]
},
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "8e1b1258d03f72237ebaecca9ff78d8951a4b281947bef16b8bc774feca42937",
"Gateway": "172.16.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.16.0.5",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:10:00:05",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"MacAddress": "02:42:ac:10:00:05",
"DriverOpts": null,
"NetworkID": "b914ed43880d4258355ef85e24f301f098f06a0a4c1d17d826cbb7b4e3881fdb",
"EndpointID": "8e1b1258d03f72237ebaecca9ff78d8951a4b281947bef16b8bc774feca42937",
"Gateway": "172.16.0.1",
"IPAddress": "172.16.0.5",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"DNSNames": null
}
}
}
}
]
{
"Id": "c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b",
"Created": "2024-08-04T02:43:24.909341103Z",
"Path": "/startup.sh",
"Args": [],
"State": {
"Status": "running",
"Running": true,
"Paused": false,
"Restarting": false,
"OOMKilled": false,
"Dead": false,
"Pid": 1308978,
"ExitCode": 0,
"Error": "",
"StartedAt": "2024-08-14T11:31:49.644923079Z",
"FinishedAt": "2024-08-14T11:31:49.206669276Z"
},
"Image": "sha256:629ec4df10b1d0202f30c9f379dea586ead067722597cedb0f3ebb9eb3337065",
"ResolvConfPath": "/var/lib/docker/containers/c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b/resolv.conf",
"HostnamePath": "/var/lib/docker/containers/c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b/hostname",
"HostsPath": "/var/lib/docker/containers/c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b/hosts",
"LogPath": "/var/lib/docker/containers/c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b/c2496d852ee3affd295a177e9f26f163a53da8d11e3708d6a479f189f707ad0b-json.log",
"Name": "/lmdeploy",
"RestartCount": 0,
"Driver": "overlay2",
"Platform": "linux",
"MountLabel": "",
"ProcessLabel": "",
"AppArmorProfile": "docker-default",
"ExecIDs": null
}
/startup.sh
。running
。resolv.conf
文件路径。hostname
文件路径。hosts
文件路径。/lmdeploy
。overlay2
。linux
。docker-default
。null
。{
"HostConfig": {
"Binds": [
"/home/hlj/.cache/huggingface:/root/.cache/huggingface"
],
"ContainerIDFile": "",
"LogConfig": {
"Type": "json-file",
"Config": {
"max-file": "3",
"max-size": "10m"
}
},
"NetworkMode": "bridge",
"PortBindings": {
"23333/tcp": [
{
"HostIp": "",
"HostPort": "23333"
}
]
},
"RestartPolicy": {
"Name": "no",
"MaximumRetryCount": 0
},
"AutoRemove": false,
"VolumeDriver": "",
"VolumesFrom": null,
"ConsoleSize": [
60,
121
],
"CapAdd": null,
"CapDrop": null,
"CgroupnsMode": "private",
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "host",
"Cgroup": "",
"Links": null,
"OomScoreAdj": 0,
"PidMode": "",
"Privileged": false,
"PublishAllPorts": false,
"ReadonlyRootfs": false,
"SecurityOpt": [
"label=disable"
],
"UTSMode": "",
"UsernsMode": "",
"ShmSize": 67108864,
"Runtime": "nvidia",
"Isolation": "",
"CpuShares": 0,
"Memory": 0,
"NanoCpus": 0,
"CgroupParent": "",
"BlkioWeight": 0,
"BlkioWeightDevice": [],
"BlkioDeviceReadBps": [],
"BlkioDeviceWriteBps": [],
"BlkioDeviceReadIOps": [],
"BlkioDeviceWriteIOps": [],
"CpuPeriod": 0,
"CpuQuota": 0,
"CpuRealtimePeriod": 0,
"CpuRealtimeRuntime": 0,
"CpusetCpus": "",
"CpusetMems": "",
"Devices": [],
"DeviceCgroupRules": null,
"DeviceRequests": [
{
"Driver": "",
"Count": -1,
"DeviceIDs": null,
"Capabilities": [
[
"gpu"
]
],
"Options": {}
}
],
"MemoryReservation": 0,
"MemorySwap": 0,
"MemorySwappiness": null,
"OomKillDisable": null,
"PidsLimit": null,
"Ulimits": [],
"CpuCount": 0,
"CpuPercent": 0,
"IOMaximumIOps": 0,
"IOMaximumBandwidth": 0,
"MaskedPaths": [
"/proc/asound",
"/proc/acpi",
"/proc/kcore",
"/proc/keys",
"/proc/latency_stats",
"/proc/timer_list",
"/proc/timer_stats",
"/proc/sched_debug",
"/proc/scsi",
"/sys/firmware",
"/sys/devices/virtual/powercap"
],
"ReadonlyPaths": [
"/proc/bus",
"/proc/fs",
"/proc/irq",
"/proc/sys",
"/proc/sysrq-trigger"
]
}
}
/home/hlj/.cache/huggingface
挂载到容器的 /root/.cache/huggingface
。json-file
日志驱动,并设置最大文件数和大小。bridge
。23333
端口映射到容器的 23333
端口。no
,表示不自动重启。host
,表示共享主机的 IPC 命名空间。nvidia
,表示使用 NVIDIA 运行时。{
"GraphDriver": {
"Data": {
"LowerDir": "/var/lib/docker/overlay2/ddf24cd9ee208b8219020834967b5e5cf84f570879a9ddd7cefaa5968db598b2-init/diff:/var/lib/docker/overlay2/kd1a3js9cf8p1x3dih4oqksay/diff:/var/lib/docker/overlay2/e83a275c474b137f32aeec2d8b0835ddf5ed8ecd3671d7d83034b9ce62bd42e1/diff:/var/lib/docker/overlay2/1e389356a5fc4a57d53fbb5f806fb7ae294d0fb9cf32797b541b4756b309d70e/diff:/var/lib/docker/overlay2/da8f6d57b66412e24313af526b34b030be59fbe69d58d978bfc8910fb0a02768/diff:/var/lib/docker/overlay2/22a01998c4071857ea37a948e3aea91ffd7839f0cee89f78167b2d16bf862dbe/diff:/var/lib/docker/overlay2/0edeaba0eacef4e0ddc86dda01e4675257701cb12546b4d0ece8509313193420/diff:/var/lib/docker/overlay2/1bdd123142274c8dd7439373506bc3a13b997803ae1f91e4ca1a4f7b42f747e6/diff:/var/lib/docker/overlay2/b8add21d81efb9c7ac49e96cea14143b5c1e44fcafbc4ade08040039a54cf794/diff:/var/lib/docker/overlay2/c550471aadac0dd9cf61d894cf0c7ba4f194e44b103617610048dd57243778af/diff:/var/lib/docker/overlay2/d1353c33022ef4af2f85de516e6656201cdf13e66b32630a9e9450883181bd41/diff:/var/lib/docker/overlay2/e41238625eb790dde7e2e83c4679f7b0e473eaf8e5d3adbfd098b273bdb210b9/diff:/var/lib/docker/overlay2/2144bef9db48678df41a01bd901a7b7ddd282ace8ceb902910d3d5152a00645f/diff:/var/lib/docker/overlay2/4c2f9582f9a15ca6626af7337211304f11f3e6d23e7f0758530245a50d220078/diff:/var/lib/docker/overlay2/abc505d36333267f450108bd96c00ac5ff1e128c260e61e7997da2be301a0d51/diff:/var/lib/docker/overlay2/62681593678b2b8fda5b477cccb9c7c65ab998c72b0206af834f36fb8cc756ef/diff:/var/lib/docker/overlay2/010d7cb67f6ca5714671338cca64799957ef1e4e955a0ec2062d623a0f21ac45/diff:/var/lib/docker/overlay2/a4c223bc609c7c2b6f480c31ade268fba8a1c186ab9401e3132a38ebf4bc271c/diff:/var/lib/docker/overlay2/b563a8c0ff49d555df389db0bb2495ba402d6847491f756c7fa03589bf4569fe/diff:/var/lib/docker/overlay2/a88230089aad72f7fb7afeb1a2ab108aa78e5a88cc1207e7c3f5fe377fa62c71/diff:/var/lib/docker/overlay2/809390ce9fd3b8ea936f6262068ceeee0b337a9e46c297b22850f516c4f6fc36/diff:/var/lib/docker/overlay2/49b671d21d41637d8c448b6d30ab8a26e45fcd89ef427bb015053c2a99d872bb/diff:/var/lib/docker/overlay2/fcee4f32a58f9552a4fefc701ff02e3d0afe71b2acd013e3d8340b322bbbe778/diff:/var/lib/docker/overlay2/3f38c8a89ef97cba50090290c7805db38f1656b11665a8b60c99d020d3a5af7e/diff:/var/lib/docker/overlay2/808d9a4cb41fd6b70a13bec963e8082cb02a01657881baedff0d0ee69f44869f/diff:/var/lib/docker/overlay2/4cee062cf5bef4a43685e9e85531c20fb8b9cdfcbca79ecebf432ca442f3e499/diff:/var/lib/docker/overlay2/f8a3e6806a1464a4905f7a0aa7bcf25333e18f9ad2ddb56a9e0001bd8792f28e/diff:/var/lib/docker/overlay2/1cd44855a28cdd0506b113fd73c296a8761be0253d6fe6ca1d9db94b005b9f7b/diff:/var/lib/docker/overlay2/31d1b514bb95906f8d3106674f16472703e942bec3796162ace45fc36141304c/diff:/var/lib/docker/overlay2/9fdf9b9d162ffa05f103c66464ff92ed89e8d38ac51c7c759540747d09d79d37/diff:/var/lib/docker/overlay2/02579a706091284489d97589cca37a33e2d34839030940118eb4241921f144ce/diff",
"MergedDir": "/var/lib/docker/overlay2/ddf24cd9ee208b8219020834967b5e5cf84f570879a9ddd7cefaa5968db598b2/merged",
"UpperDir": "/var/lib/docker/overlay2/ddf24cd9ee208b8219020834967b5e5cf84f570879a9ddd7cefaa5968db598b2/diff",
"WorkDir": "/var/lib/docker/overlay2/ddf24cd9ee208b8219020834967b5e5cf84f570879a9ddd7cefaa5968db598b2/work"
},
"Name": "overlay2"
}
}
overlay2
。{
"Mounts": [
{
"Type": "bind",
"Source": "/home/hlj/.cache/huggingface",
"Destination": "/root/.cache/huggingface",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
]
}
bind
。rprivate
。{
"Config": {
"Hostname": "c2496d852ee3",
"Env": [
"HUGGING_FACE_HUB_TOKEN=" ,
"PATH=/opt/py38/bin:/opt/tritonserver/bin:/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ucx/bin",
"CUDA_VERSION=11.8.0.065",
"CUDA_DRIVER_VERSION=520.61.05",
"CUDA_CACHE_DISABLE=1",
"NVIDIA_REQUIRE_JETPACK_HOST_MOUNTS=",
"_CUDA_COMPAT_PATH=/usr/local/cuda/compat",
"ENV=/etc/shinit_v2",
"BASH_ENV=/etc/bash.bashrc",
"SHELL=/bin/bash",
"NVIDIA_REQUIRE_CUDA=cuda>=9.0",
"NCCL_VERSION=2.15.5",
"CUBLAS_VERSION=11.11.3.6",
"CUFFT_VERSION=10.9.0.58",
"CURAND_VERSION=10.3.0.86",
"CUSPARSE_VERSION=11.7.5.86",
"CUSOLVER_VERSION=11.4.1.48",
"CUTENSOR_VERSION=1.6.1.5",
"NPP_VERSION=11.8.0.86",
"NVJPEG_VERSION=11.9.0.86",
"CUDNN_VERSION=8.7.0.84",
"TRT_VERSION=8.5.1.7",
"TRTOSS_VERSION=22.12",
"NSIGHT_SYSTEMS_VERSION=2022.4.2.1",
"NSIGHT_COMPUTE_VERSION=2022.3.0.22",
"DALI_VERSION=1.20.0",
"DALI_BUILD=6562491",
"POLYGRAPHY_VERSION=0.43.1",
"TRANSFORMER_ENGINE_VERSION=0.3",
"LD_LIBRARY_PATH=/opt/tritonserver/lib:/opt/tritonserver/backends/onnxruntime:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64",
"NVIDIA_VISIBLE_DEVICES=all",
"NVIDIA_DRIVER_CAPABILITIES=compute,utility,video",
"NVIDIA_PRODUCT_NAME=Triton Server",
"GDRCOPY_VERSION=2.3",
"HPCX_VERSION=2.13",
"MOFED_VERSION=5.4-rdmacore36.0",
"OPENUCX_VERSION=1.14.0",
"OPENMPI_VERSION=4.1.4",
"RDMACORE_VERSION=36.0",
"OPAL_PREFIX=/opt/hpcx/ompi",
"OMPI_MCA_coll_hcoll_enable=0",
"LIBRARY_PATH=/usr/local/cuda/lib64/stubs:",
"TRITON_SERVER_VERSION=2.29.0",
"NVIDIA_TRITON_SERVER_VERSION=22.12",
"TF_ADJUST_HUE_FUSED=1",
"TF_ADJUST_SATURATION_FUSED=1",
"TF_ENABLE_WINOGRAD_NONFUSED=1",
"TF_AUTOTUNE_THRESHOLD=2",
"TRITON_SERVER_GPU_ENABLED=1",
"TRITON_SERVER_USER=triton-server",
"DEBIAN_FRONTEND=noninteractive",
"TCMALLOC_RELEASE_RATE=200",
"DCGM_VERSION=2.2.9",
"NVIDIA_BUILD_ID=50109463",
"NCCL_LAUNCH_MODE=GROUP",
"TRITON_PTXAS_PATH=/usr/local/cuda/bin/ptxas"
],
"Image": "lmdeploy:1.0",
"WorkingDir": "/opt/lmdeploy",
"Entrypoint": [
"/startup.sh"
],
"OnBuild": null,
"Labels": {
"com.amazonaws.sagemaker.capabilities.accept-bind-to-port": "true",
"com.amazonaws.sagemaker.capabilities.multi-models": "true",
"com.nvidia.build.id": "50109463",
"com.nvidia.build.ref": "1a651ccb23c8f4416b5540653b207154a531194d",
"com.nvidia.cublas.version": "11.11.3.6",
"com.nvidia.cuda.version": "9.0",
"com.nvidia.cudnn.version": "8.7.0.84",
"com.nvidia.cufft.version": "10.9.0.58",
"com.nvidia.curand.version": "10.3.0.86",
"com.nvidia.cusolver.version": "11.4.1.48",
"com.nvidia.cusparse.version": "11.7.5.86",
"com.nvidia.cutensor.version": "1.6.1.5",
"com.nvidia.nccl.version": "2.15.5",
"com.nvidia.npp.version": "11.8.0.86",
"com.nvidia.nsightcompute.version": "2022.3.0.22",
"com.nvidia.nsightsystems.version": "2022.4.2.1",
"com.nvidia.nvjpeg.version": "11.9.0.86",
"com.nvidia.tensorrt.version": "8.5.1.7",
"com.nvidia.tensorrtoss.version": "22.12",
"com.nvidia.tritonserver.version": "2.29.0",
"com.nvidia.volumes.needed": "nvidia_driver"
}
}
}
lmdeploy:1.0
。/opt/lmdeploy
。/startup.sh
。null
。{
"NetworkSettings": {
"Bridge": "",
"SandboxID": "209975bf9949fed38210ded62b87b4487f78391ab994bb7e572ba9ed2dada380",
"SandboxKey": "/var/run/docker/netns/209975bf9949",
"Ports": {
"23333/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "23333"
},
{
"HostIp": "::",
"HostPort": "23333"
}
]
},
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "8e1b1258d03f72237ebaecca9ff78d8951a4b281947bef16b8bc774feca42937",
"Gateway": "172.16.0.1",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"IPAddress": "172.16.0.5",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:10:00:05",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"MacAddress": "02:42:ac:10:00:05",
"DriverOpts": null,
"NetworkID": "b914ed43880d4258355ef85e24f301f098f06a0a4c1d17d826cbb7b4e3881fdb",
"EndpointID": "8e1b1258d03f72237ebaecca9ff78d8951a4b281947bef16b8bc774feca42937",
"Gateway": "172.16.0.1",
"IPAddress": "172.16.0.5",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"DNSNames": null
}
}
}
}
23333
端口映射到容器的 23333
端口。false
。0
。null
。null
。172.16.0.1
。0
。172.16.0.5
。16
。02:42:ac:10:00:05
。bridge
网络。
null
。null
。null
。02:42:ac:10:00:05
。null
。b914ed43880d4258355ef85e24f301f098f06a0a4c1d17d826cbb7b4e3881fdb
。8e1b1258d03f72237ebaecca9ff78d8951a4b281947bef16b8bc774feca42937
。172.16.0.1
。172.16.0.5
。16
。0
。null
。通过 docker inspect
命令的详细输出,我们可以看到容器的各种配置和状态信息,包括基本信息、主机配置、存储驱动信息、挂载点信息、容器配置和网络设置。这些信息可以帮助我们了解容器的运行环境、资源使用情况以及网络配置等。
通过分析 docker inspect
的输出,我们可以推测出容器的运行命令:
docker run -d \
--name lmdeploy \
--runtime nvidia \
--gpus all \
-v /home/hlj/.cache/huggingface:/root/.cache/huggingface \
-p 23333:23333 \
--ipc=host \
-w /opt/lmdeploy \
--env "HUGGING_FACE_HUB_TOKEN=" \
--env "PATH=/opt/py38/bin:/opt/tritonserver/bin:/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ucx/bin" \
--env "CUDA_VERSION=11.8.0.065" \
--env "CUDA_DRIVER_VERSION=520.61.05" \
--env "CUDA_CACHE_DISABLE=1" \
--env "NVIDIA_REQUIRE_JETPACK_HOST_MOUNTS=" \
--env "_CUDA_COMPAT_PATH=/usr/local/cuda/compat" \
--env "ENV=/etc/shinit_v2" \
--env "BASH_ENV=/etc/bash.bashrc" \
--env "SHELL=/bin/bash" \
--env "NVIDIA_REQUIRE_CUDA=cuda>=9.0" \
--env "NCCL_VERSION=2.15.5" \
--env "CUBLAS_VERSION=11.11.3.6" \
--env "CUFFT_VERSION=10.9.0.58" \
--env "CURAND_VERSION=10.3.0.86" \
--env "CUSPARSE_VERSION=11.7.5.86" \
--env "CUSOLVER_VERSION=11.4.1.48" \
--env "CUTENSOR_VERSION=1.6.1.5" \
--env "NPP_VERSION=11.8.0.86" \
--env "NVJPEG_VERSION=11.9.0.86" \
--env "CUDNN_VERSION=8.7.0.84" \
--env "TRT_VERSION=8.5.1.7" \
--env "TRTOSS_VERSION=22.12" \
--env "NSIGHT_SYSTEMS_VERSION=2022.4.2.1" \
--env "NSIGHT_COMPUTE_VERSION=2022.3.0.22" \
--env "DALI_VERSION=1.20.0" \
--env "DALI_BUILD=6562491" \
--env "POLYGRAPHY_VERSION=0.43.1" \
--env "TRANSFORMER_ENGINE_VERSION=0.3" \
--env "LD_LIBRARY_PATH=/opt/tritonserver/lib:/opt/tritonserver/backends/onnxruntime:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64" \
--env "NVIDIA_VISIBLE_DEVICES=all" \
--env "NVIDIA_DRIVER_CAPABILITIES=compute,utility,video" \
--env "NVIDIA_PRODUCT_NAME=Triton Server" \
--env "GDRCOPY_VERSION=2.3" \
--env "HPCX_VERSION=2.13" \
--env "MOFED_VERSION=5.4-rdmacore36.0" \
--env "OPENUCX_VERSION=1.14.0" \
--env "OPENMPI_VERSION=4.1.4" \
--env "RDMACORE_VERSION=36.0" \
--env "OPAL_PREFIX=/opt/hpcx/ompi" \
--env "OMPI_MCA_coll_hcoll_enable=0" \
--env "LIBRARY_PATH=/usr/local/cuda/lib64/stubs:" \
--env "TRITON_SERVER_VERSION=2.29.0" \
--env "NVIDIA_TRITON_SERVER_VERSION=22.12" \
--env "TF_ADJUST_HUE_FUSED=1" \
--env "TF_ADJUST_SATURATION_FUSED=1" \
--env "TF_ENABLE_WINOGRAD_NONFUSED=1" \
--env "TF_AUTOTUNE_THRESHOLD=2" \
--env "TRITON_SERVER_GPU_ENABLED=1" \
--env "TRITON_SERVER_USER=triton-server" \
--env "DEBIAN_FRONTEND=noninteractive" \
--env "TCMALLOC_RELEASE_RATE=200" \
--env "DCGM_VERSION=2.2.9" \
--env "NVIDIA_BUILD_ID=50109463" \
--env "NCCL_LAUNCH_MODE=GROUP" \
--env "TRITON_PTXAS_PATH=/usr/local/cuda/bin/ptxas" \
lmdeploy:1.0 /startup.sh
-d
:以后台模式运行容器。--name lmdeploy
:容器名称为 lmdeploy
。--runtime nvidia
:指定使用 NVIDIA 运行时。--gpus all
:允许容器访问所有 GPU。-v /home/hlj/.cache/huggingface:/root/.cache/huggingface
:挂载主机目录到容器内。-p 23333:23333
:将宿主机的 23333
端口映射到容器的 23333
端口。--ipc=host
:使容器使用主机的 IPC 命名空间。-w /opt/lmdeploy
:设置工作目录。--env
:设置多个环境变量。lmdeploy:1.0
:使用 lmdeploy:1.0
镜像。/startup.sh
:执行 /startup.sh
脚本。通过这些信息,我们可以准确地重现容器的启动命令。
你可以将通过 -e
参数设置的环境变量放到 startup.sh
脚本中。这样可以使你的 Docker 启动命令更加简洁,并且将环境变量的配置集中到一个地方,便于管理。
startup.sh
你可以在 startup.sh
脚本的顶部添加所有需要的环境变量。例如:
#!/bin/bash
# 设置环境变量
export HUGGING_FACE_HUB_TOKEN=<secret>
export PATH=/opt/py38/bin:/opt/tritonserver/bin:/usr/local/mpi/bin:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ucx/bin
export CUDA_VERSION=11.8.0.065
export CUDA_DRIVER_VERSION=520.61.05
export CUDA_CACHE_DISABLE=1
export NVIDIA_REQUIRE_JETPACK_HOST_MOUNTS=
export _CUDA_COMPAT_PATH=/usr/local/cuda/compat
export ENV=/etc/shinit_v2
export BASH_ENV=/etc/bash.bashrc
export SHELL=/bin/bash
export NVIDIA_REQUIRE_CUDA=cuda>=9.0
export NCCL_VERSION=2.15.5
export CUBLAS_VERSION=11.11.3.6
export CUFFT_VERSION=10.9.0.58
export CURAND_VERSION=10.3.0.86
export CUSPARSE_VERSION=11.7.5.86
export CUSOLVER_VERSION=11.4.1.48
export CUTENSOR_VERSION=1.6.1.5
export NPP_VERSION=11.8.0.86
export NVJPEG_VERSION=11.9.0.86
export CUDNN_VERSION=8.7.0.84
export TRT_VERSION=8.5.1.7
export TRTOSS_VERSION=22.12
export NSIGHT_SYSTEMS_VERSION=2022.4.2.1
export NSIGHT_COMPUTE_VERSION=2022.3.0.22
export DALI_VERSION=1.20.0
export DALI_BUILD=6562491
export POLYGRAPHY_VERSION=0.43.1
export TRANSFORMER_ENGINE_VERSION=0.3
export LD_LIBRARY_PATH=/opt/tritonserver/lib:/opt/tritonserver/backends/onnxruntime:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
export NVIDIA_VISIBLE_DEVICES=all
export NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
export NVIDIA_PRODUCT_NAME=Triton Server
export GDRCOPY_VERSION=2.3
export HPCX_VERSION=2.13
export MOFED_VERSION=5.4-rdmacore36.0
export OPENUCX_VERSION=1.14.0
export OPENMPI_VERSION=4.1.4
export RDMACORE_VERSION=36.0
export OPAL_PREFIX=/opt/hpcx/ompi
export OMPI_MCA_coll_hcoll_enable=0
export LIBRARY_PATH=/usr/local/cuda/lib64/stubs:
export TRITON_SERVER_VERSION=2.29.0
export NVIDIA_TRITON_SERVER_VERSION=22.12
export TF_ADJUST_HUE_FUSED=1
export TF_ADJUST_SATURATION_FUSED=1
export TF_ENABLE_WINOGRAD_NONFUSED=1
export TF_AUTOTUNE_THRESHOLD=2
export TRITON_SERVER_GPU_ENABLED=1
export TRITON_SERVER_USER=triton-server
export DEBIAN_FRONTEND=noninteractive
export TCMALLOC_RELEASE_RATE=200
export DCGM_VERSION=2.2.9
export NVIDIA_BUILD_ID=50109463
export NCCL_LAUNCH_MODE=GROUP
export TRITON_PTXAS_PATH=/usr/local/cuda/bin/ptxas
# 运行主程序或其他命令
# 在这里添加你的主程序启动命令,例如:
# ./my_main_program
在将环境变量移到 startup.sh
后,你可以简化 Docker 启动命令:
docker run -d \
--gpus all \
--name lmdeploy \
-p 23333:23333 \
--runtime=nvidia \
-v /home/hlj/.cache/huggingface:/root/.cache/huggingface \
-w /opt/lmdeploy \
lmdeploy:1.0 /startup.sh
权限:确保 startup.sh
脚本具有可执行权限。如果没有,可以使用以下命令添加可执行权限:
chmod +x /path/to/startup.sh
保密信息:如果 HUGGING_FACE_HUB_TOKEN
或其他环境变量包含敏感信息,确保 startup.sh
的访问权限是安全的,以防止未经授权的访问。
调试和验证:在修改 startup.sh
脚本后,建议先在本地运行并验证其功能,然后再将其用于 Docker 容器中,以确保一切按预期工作。
通过将环境变量移到 startup.sh
,你可以使 Docker 启动命令更加简洁,同时也方便环境变量的管理。如果你在任何步骤遇到问题,请随时提问!