我只是想与社区分享我如何设法在 AWS Elastic Beanstalk 上的 Docker 容器中运行 GPU 加速应用程序。我花了将近两天的时间反复试验,所以我希望其他人不要浪费时间在这里发表这篇文章。
这些是我的 Elastic Beanstalk 环境的设置:
ami-068d6d02d8775ec52g3s.xlarge它,因为它足以满足我需要做的事情。Dockerfile添加以下几行:ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
Run Code Online (Sandbox Code Playgroud)
.ebextensions/01-nvidia-docker.config文件并粘贴以下代码:option_settings:
aws:autoscaling:launchconfiguration:
# I had to increase storage space for the docker to run my container
BlockDeviceMappings: /dev/xvdcz=:24:true
commands:
configure_docker_run:
# I had to update EB startup script so it passes …Run Code Online (Sandbox Code Playgroud)