gpt4 book ai didi

python - VirtualBox Ubuntu 在尝试从 CMake 构建 CXX 对象时卡住

转载 作者:行者123 更新时间:2023-12-04 18:43:27 34 4
gpt4 key购买 nike

enter image description here
我正在尝试构建一个 Dockerfile,它是:

FROM pytorch/pytorch:1.1.0-cuda10.0-cudnn7.5-devel

# Dependencies for Pymesh
RUN apt update -qq && apt install -q -y \
libsm6 \
libxext6 \
libxrender-dev \
wget

# Cmake 3.15 (Pymesh dependency)
RUN apt update && \
apt install -y libncurses5-dev libncursesw5-dev libssl1.0.0 libssl-dev && \
cd /workspace && \
wget https://github.com/Kitware/CMake/releases/download/v3.15.2/cmake-3.15.2.tar.gz && \
tar -xf cmake-3.15.2.tar.gz && \
cd cmake-3.15.2/ && \
./bootstrap && \
make -j && \
make install && \
cd ..

# Pymesh
RUN apt update && \
apt install -y libgmp-dev libmpfr-dev libboost-dev libboost-thread-dev && \
cd /workspace && \
git clone https://github.com/PyMesh/PyMesh.git && \
cd PyMesh && \
git submodule update --init && \
./setup.py build && \
./setup.py install

RUN conda install torchvision==0.3 -c pytorch

# Softras
RUN cd /workspace && \
git clone https://github.com/ShichenLiu/SoftRas.git && \
cd SoftRas && \
python setup.py install

# NMR
## for CUDA9, `pip install neural_renderer_pytorch`
## for CUDA 10, install from source as follows
RUN pip install cupy-cuda100 && \
cd /workspace && \
git clone https://github.com/daniilidis-group/neural_renderer/ && \
cd neural_renderer && \
python setup.py build && \
python setup.py install

# Python dependencies
RUN pip install absl-py tensorflow==2.0.0 tensorboard==2.0.1 tensorboardx==1.9 \
opencv-python==4.1.0.25 dotmap scipy visdom dominate meshzoo==0.4.3 moviepy==1.0.1 chainer ipdb

RUN apt update -qq \
&& apt install -qy libglib2.0-0 \
&& apt install -y openssh-server
当我指示 docker 构建它时,它连续四次卡住在 Building CXX Object Source/CMakeFiles/CMakeLib.dir/... ,然后给出错误: [1414.141391] Out of memory: Killed process 16679 (cc1plus) total-vm:86116kB, anon-rss:11628kB, file-rss:0kb, shmem-rss:0kb, UID:0 pgtables:192kb oom_score_adj:0因此,由于这看起来像是 RAM 问题,我已将 VirtualBox 的内存提高到 14GB(我的实际机器上有 16GB RAM),但每次仍然会出现错误。
我的主机上没有足够的内存来破坏它吗?还是有其他原因导致这种情况发生?

最佳答案

问题是 Dockerfile 中有这一行: make -j && \这使得太多东西同时运行并占用内存。将其更改为 make -j4 && \解决了问题!

关于python - VirtualBox Ubuntu 在尝试从 CMake 构建 CXX 对象时卡住,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65414129/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com