我正试图在google云上部署。我的Dockerfile:
FROM ubuntu:20.04
RUN apt update
RUN apt -y install sudo
RUN apt -y install curl
RUN sudo apt install -y build-essential
RUN curl -O https://storage.googleapis.com/nvidia-drivers-us-public/GRID/GRID13.0/NVIDIA-Linux-x86_64-470.63.01-grid.run
RUN chmod +x NVIDIA-Linux-x86_64-470.63.01-grid.run
RUN sudo /bin/bash NVIDIA-Linux-x86_64-470.63.01-grid.run
FROM python:3.8
RUN adduser meat
RUN passwd -d meat
USER meat
WORKDIR /home/meat
RUN python3 -m venv meat-env
RUN /bin/bash -c "source meat-env/bin/activate"
RUN /usr/local/bin/python -m pip install --upgrade pip
COPY requirements.txt .
RUN pip3 install -r requirements.txt
COPY . .
CMD ["python", "main.py"]我得到了一个错误:
Step 8/20 : RUN sudo /bin/bash NVIDIA-Linux-x86_64-470.63.01-grid.run
---> Running in 811998f9cea8
Verifying archive integrity...
OK
Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 470.63.01
...............和几个点(.)后来
[91mError opening terminal: unknown.
[0m
unable to stream build output: The command '/bin/sh -c sudo /bin/bash NVIDIA-Linux-x86_64-470.63.01-grid.run' returned a non-zero code: 1
Failed to build the app. Error: unable to stream build output: The command '/bin/sh -c sudo /bin/bash NVIDIA-Linux-x86_64-470.63.01-grid.run' returned a non-zero code: 1我的Dockerfile出了什么问题?还是有不同的方式来执行命令?
发布于 2021-12-15 08:44:51
@DazWilkin的评论是正确的:
不可能将图形驱动程序安装到完全管理的云运行中,因为它不公开任何GPU。
您应该在(GKE)中部署它。但是,您需要配置GKE集群来安装GPU,根据文档,您应该遵循以下步骤:
在此步骤中,您可以启用虚拟工作站(NVIDIA网格)。请选择GPU,如NVIDIA T4、P4或P100来启用NVIDIA网格。
现在,您可以创建一个将使用GPU的服务,并将映像部署到为Anthos运行的云中:
https://stackoverflow.com/questions/70342532
复制相似问题