gpt4 book ai didi

amazon-web-services - 生命周期配置超过 5 分钟,nohup 命令不起作用

转载 作者:行者123 更新时间:2023-12-05 05:52:09 25 4
gpt4 key购买 nike

我正在尝试为我的 jupyter notebook 安装一些依赖项,但希望它们是永久性的,以便在我每次重新启动 notebook 时节省 20 分钟。我已选择使用生命周期配置,但是,我的脚本运行时间超过 5 分钟。我找到这篇文章 ( https://aws.amazon.com/premiumsupport/knowledge-center/sagemaker-lifecycle-script-timeout/ ) 来帮助解决这个问题,但是,我的笔记本仍然无法启动,并出现以下错误:

Notebook Instance Lifecycle Config 'arn:aws:sagemaker:eu-west-2:347285168835:notebook-instance-lifecycle-config/nbs-aap-dev-dsar' for Notebook Instance 'arn:aws:sagemaker:eu-west-2:347285168835:notebook-instance/nbs-aap-dev-dsar' took longer than 5 minutes. Please check your CloudWatch logs for more details if your Notebook Instance has Internet access.

这是我要运行的脚本:

sudo nohup yum install wget &
sudo yum install autoconf &
sudo yum install automake &
sudo yum install libtool &
sudo yum install jpeg &
sudo yum install tiff &
sudo yum install libpng &
sudo yum install tiff2png &
sudo yum install libtiff &
sudo yum install autoconf aclocal automake &
sudo yum install libtool &
sudo yum -y install libjpeg-devel libpng-devel libpng-devel libtiff-devel zlib-devel &
sudo yum install gcc gcc-c++ make &
sudo wget https://github.com/DanBloomberg/leptonica/releases/download/1.82.0/leptonica-1.82.0.tar.gz &
sudo tar xzvf leptonica-1.82.0.tar.gz &
cd leptonica-1.82.0 &
sudo ./configure --prefix=/usr/local/ &
sudo make &
sudo make install &
sudo wget https://codeload.github.com/tesseract-ocr/tesseract/tar.gz/4.1.1 &
sudo tar -zxvf 4.1.1 &
cd tesseract-4.1.1 &
sudo ./autogen.sh &
sudo cp /home/ec2-user/leptonica-1.82.0/lept.pc /usr/lib64/pkgconfig/. &
sudo LIBLEPT_HEADERSDIR=/usr/local/lib ./configure --prefix=/usr/local/ --with-extra-libraries=/usr/local/lib &
sudo make &
sudo make install &
export LD_LIBRARY_PATH=/usr/local/lib &
sudo ldconfig &
sudo wget https://github.com/tesseract-ocr/tessdata_best/raw/main/eng.traineddata &
sudo mv -v eng.traineddata /usr/local/share/tessdata/eng.traineddata &
sudo wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9550/ghostpdl-9.55.0.tar.gz &
sudo tar -zxvf ghostpdl-9.55.0.tar.gz &
cd ghostpdl-9.55.0 &
sudo ./configure --prefix=/usr/local/ &
sudo make &
sudo make install &
sudo yum -y install poppler-utils &
sudo wget https://github.com/qpdf/qpdf/releases/download/release-qpdf-10.1.0/qpdf-10.1.0.tar.gz &
sudo tar xzvf qpdf-10.1.0.tar.gz &
cd qpdf-10.1.0 &
sudo ./configure --prefix=/usr/local/ &
sudo make &
sudo make install

最佳答案

您不需要在行尾添加符号 &。这将它们置于后台并并行执行一些导致奇怪情况的命令。例如在代码中:

sudo ./configure --prefix=/usr/local/ &
sudo make &
sudo make install &

命令 makeconfigure 结束之前开始,并且在大多数情况下不会很好地结束。与 make install 相同,它会在从 make 编译之前尝试安装已编译的包如果你想把脚本放在后台,你可以用这种方式对命令进行分组:

sudo nohup yum -y install wget autoconf automake libtool jpeg tiff libpng tiff2png libtiff autoconf aclocal automake libtool libjpeg-devel libpng-devel libpng-devel libtiff-devel zlib-devel gcc gcc-c++ make poppler-utils 

nohup sudo wget https://github.com/DanBloomberg/leptonica/releases/download/1.82.0/leptonica-1.82.0.tar.gz && sudo tar xzvf leptonica-1.82.0.tar.gz &&cd leptonica-1.82.0 && sudo ./configure --prefix=/usr/local/ && sudo make && sudo make install &

nohup sudo wget https://codeload.github.com/tesseract-ocr/tesseract/tar.gz/4.1.1 &&sudo tar -zxvf 4.1.1 && cd tesseract-4.1.1 && sudo ./autogen.sh && sudo cp /home/ec2-user/leptonica-1.82.0/lept.pc /usr/lib64/pkgconfig/. && sudo LIBLEPT_HEADERSDIR=/usr/local/lib ./configure --prefix=/usr/local/ --with-extra-libraries=/usr/local/lib && sudo make && sudo make install &

nohup export LD_LIBRARY_PATH=/usr/local/lib && sudo ldconfig && sudo wget https://github.com/tesseract-ocr/tessdata_best/raw/main/eng.traineddata && sudo mv -v eng.traineddata /usr/local/share/tessdata/eng.traineddata && sudo wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9550/ghostpdl-9.55.0.tar.gz && sudo tar -zxvf ghostpdl-9.55.0.tar.gz && cd ghostpdl-9.55.0 && sudo ./configure --prefix=/usr/local/ && sudo make && sudo make install &

nohup sudo wget https://github.com/qpdf/qpdf/releases/download/release-qpdf-10.1.0/qpdf-10.1.0.tar.gz && sudo tar xzvf qpdf-10.1.0.tar.gz && cd qpdf-10.1.0 && sudo ./configure --prefix=/usr/local/ && sudo make && sudo make install &

关于amazon-web-services - 生命周期配置超过 5 分钟,nohup 命令不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70259139/

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