Understanding Problems Building Docker Images

Asked 1 years ago, Updated 1 years ago, 37 views

I was using docker by referring to the article below.

Build Calculation Environment for Kaggle with GCP and Docker - Qiita

I was able to use it without any problems until the other day, but when I tried to build a new image, I received the following error
It's coming out now.Could you tell me the cause and countermeasures?
I'm sorry to bother you, but I appreciate your help.

error message

Step 2/13: RUN apt-get update & apt-get upgrade-y & apt-get install-y -- no-install-recommendations do get wget cmake nano vim gcc g++ build-certificates software-properties & vrmpt/varp
 --- Running in 3a0c0cb0cba1
/bin/sh:apt-get:command not found
The command'/bin/sh-capt-get update & apt-get upgrade-y & apt-get install-y -- no-install-recommendations Sudogit wget cmake nano vim gcc g++ build-essential ca-certificates software-properties-common/rb/rb/rb/rb/rb

Dockerfile

FROM nvcr.io/nvidia/cuda:9.0-cudnn7-runtime-centos7

RUN apt-get update & & apt-get upgrade-y & apt-get install-y -- no-install-recommands\
    sudo git wget cmake nano vim gcc g++ build-essential ca-certificates software-properties-common\
    &rm-rf/var/lib/apt/lists/*

# install python
RUN add-apt-repositoryppa: deadnakes/ppa\
&apt-get update\
&apt-get install-y python 3.6\
&wget-O. / get-pip.py https://bootstrap.pypa.io/get-pip.py\
&python 3.6./get-pip.py\
&ln-s/usr/bin/python 3.6/usr/local/bin/python3\
&ln-s/usr/bin/python 3.6/usr/local/bin/python

# install common python packages
ADD./requirements.txt/tmp
RUN pip install pip setup tools -U&&pip install -r/tmp/requirements.txt
RUN pip install tensorflow-gpu==1.6.0
RUN pip install keras == 2.1.5

# set working directory
WORKDIR/root/user

# config and clean up
RUN ldconfig\
&apt-get clean\
&apt-get autoremove

docker

2022-09-30 16:58

1 Answers

The apt-get command is used in Debian/Ubuntu operating systems, but the Dockerfile specifies CentOS, so the (apt-get) command cannot be found.

If it was originally used, I think the designation of the OS image is probably wrong, so please check this carefully.
If you intend to use CentOS, you must use the yum command to install the package.


2022-09-30 16:58

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.