首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在dockerfile中安装奇点错误

在dockerfile中安装奇点错误
EN

Stack Overflow用户
提问于 2022-03-17 17:01:38
回答 1查看 193关注 0票数 0

我正在尝试运行一个nextflow管道,它使用较早版本的nextflow (21.04.3)和java版本8。因为我必须在远程服务器上使用这个管道,所以我只能使用奇异性。

因此,由于这个nextflow管道也使用奇点拉调用,所以我还需要安装在坞映像中的奇点。然后,我可以将这个图像停靠器图像转换为一个奇点图像,然后我可以将它移动到远程服务器。

我试图在dockerfile中安装奇异点,但是我收到了错误,

这是我用的文件,

代码语言:javascript
复制
FROM python:3.8.9-slim 
LABEL authors="phil.ewels@scilifelab.se,erik.danielsson@scilifelab.se" \
  description="Docker image containing requirements for the nfcore tools"

# Do not pick up python packages from $HOME
ENV PYTHONNUSERSITE=1

# Update pip to latest version
RUN python -m pip install --upgrade pip

# Install dependencies
COPY requirements.txt requirements.txt
RUN python -m pip install -r requirements.txt

# Install Nextflow dependencies
RUN apt-get update \
  && apt-get upgrade -y \
  && apt-get install -y git \
  && apt-get install -y wget

# Create man dir required for Java installation 
# and install Java
RUN mkdir -p /usr/share/man/man1 \
  && apt-get install -y  openjdk-11-jre \
  && apt-get clean -y && rm -rf /var/lib/apt/lists/*

# Install Singularity 
RUN wget -O- http://neuro.debian.net/lists/xenial.us-ca.full | tee /etc/apt/sources.list.d/neurodebian.sources.list && \ apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 && \ apt-get update 

RUN apt-get install -y singularity-container

# Setup ARG for NXF_VER ENV
ARG NXF_VER=""
ENV NXF_VER ${NXF_VER}
# Install Nextflow
RUN wget https://github.com/nextflow- io/nextflow/releases/download/v21.04.3/nextflow | bash \
  && mv nextflow /usr/local/bin \
  && chmod a+rx /usr/local/bin/nextflow
# Add the nf-core source files to the image
COPY . /usr/src/nf_core
WORKDIR /usr/src/nf_core

# Install nf-core
RUN python -m pip install .

# Set up entrypoint and cmd for easy docker usage
CMD [ "." ]

这些是我所犯的错误

代码语言:javascript
复制
Step 9/17 : RUN wget -O- http://neuro.debian.net/lists/xenial.us-ca.full | tee 
/etc/apt/sources.list.d/neurodebian.sources.list && \ apt-key adv --recv-keys -- 
keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 && \ apt-get update
---> Running in afc3dcbbd1ee
--2022-03-17 17:40:19--  http://neuro.debian.net/lists/xenial.us-ca.full
Resolving neuro.debian.net (neuro.debian.net)... 129.170.233.11
Connecting to neuro.debian.net (neuro.debian.net)|129.170.233.11|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 262
Saving to: ‘STDOUT’

 0K                                                       100% 18.4M=0s

deb http://neurodeb.pirsquared.org data main contrib non-free
#deb-src http://neurodeb.pirsquared.org data main contrib non-free
deb http://neurodeb.pirsquared.org xenial main contrib non-free
#deb-src http://neurodeb.pirsquared.org xenial main contrib non-free
2022-03-17 17:40:19 (18.4 MB/s) - written to stdout [262/262]

/bin/sh: 1:  apt-key: not found
The command '/bin/sh -c wget -O- http://neuro.debian.net/lists/xenial.us-ca.full | tee /etc/apt/sources.list.d/neurodebian.sources.list && \ apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9 && \ apt-get update' 
returned a non-zero code: 127

我有一种使用dockerfile安装奇点的方法?

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-03-20 14:04:53

我根据在给定这里的linux中安装奇点的方法对dockerfile进行了一些修改。

下面给出了我能够成功地运行nextflow、java和奇异性的完整dockerfile。

代码语言:javascript
复制
FROM python:3.8.9-slim 
LABEL 
authors="phil.ewels@scilifelab.se,erik.danielsson@scilifelab.se" \
  description="Docker image containing requirements for the nfcore tools"

# Do not pick up python packages from $HOME
ENV PYTHONNUSERSITE=1

# Update pip to latest version
RUN python -m pip install --upgrade pip

# Install dependencies
COPY requirements.txt requirements.txt
RUN python -m pip install -r requirements.txt

# Install Nextflow dependencies
RUN apt-get update \
  && apt-get upgrade -y \
  && apt-get install -y git \
  && apt-get install -y wget

# Create man dir required for Java installation 
# and install Java
RUN mkdir -p /usr/share/man/man1 \
  && apt-get install -y  openjdk-11-jre \
  && apt-get clean -y && rm -rf /var/lib/apt/lists/*


# Install Singularity

RUN apt-get update && apt-get install -y \
build-essential \
libssl-dev \
uuid-dev \
libgpgme11-dev \
squashfs-tools \
libseccomp-dev \
wget \
pkg-config \
procps

# Download Go source version 1.16.3, install them and modify the PATH
ENV VERSION=1.16.3 
ENV OS=linux 
ENV ARCH=amd64
RUN wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz && \
tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz && \
rm go$VERSION.$OS-$ARCH.tar.gz && \
echo 'export PATH=$PATH:/usr/local/go/bin' | tee -a /etc/profile

# Download Singularity from version 3.7.3 (security version)
ENV VERSION=3.7.3
RUN wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-${VERSION}.tar.gz && \
tar -xzf singularity-${VERSION}.tar.gz


# Compile Singularity sources and install it


RUN export PATH=$PATH:/usr/local/go/bin && \
cd singularity && \
./mconfig --without-suid && \
make -C ./builddir && \
make -C ./builddir install

# Setup ARG for NXF_VER ENV
ARG NXF_VER=""
ENV NXF_VER ${NXF_VER}
# Install Nextflow
RUN wget https://github.com/nextflow-io/nextflow/releases/download/v21.04.3/nextflow | bash \
  && mv nextflow /usr/local/bin \
  && chmod a+rx /usr/local/bin/nextflow
# Add the nf-core source files to the image
COPY . /usr/src/nf_core
WORKDIR /usr/src/nf_core

# Install nf-core
RUN python -m pip install .

# Set up entrypoint and cmd for easy docker usage
CMD [ "." ]

下面给出了上述dockerfile中使用的名为requirements.txt的文件,

代码语言:javascript
复制
click
GitPython
jinja2
jsonschema
packaging
prompt_toolkit>=3.0.3
pyyaml
pytest-workflow
questionary>=1.8.0
requests_cache
requests
rich>=10.0.0
tabulate
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71516306

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档