mimbres/neural-audio-fp

permission denied for building Docker Custom Image

kasireddygariDineshKumarReddy opened this issue · 5 comments

dinesh@fourier:~/neural-audio-fp$ docker build -t neural-audio-fp .
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=neural-audio-fp&target=&ulimits=null&version=1": dial unix /var/run/docker.sock: connect: permission denied

@kasireddygariDineshKumarReddy I would try sudo docker. If it doesn't work, it is docker installation issue, rather than this repo. Docker installed as rootless can cause this too.

yeah. I used with sudo.
But during $ sudo docker build -t neural-audio-fp .
i was struck at this configuration.
Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.

  1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
  2. America 5. Arctic 8. Europe 11. SystemV
  3. Antarctica 6. Asia 9. Indian 12. US
    Geographic area: Asia
    But i'm unable to resolve this issue.Please provide solution

Open your Docker file in the text editor. Insert this line before any apt activities:

ENV DEBIAN_FRONTEND=nonintercative

https://medium.com/@alexander.tyutin/docker-tips-ubuntu-and-stuck-of-interactive-tools-with-docker-build-1e95383cba96

docker/docs#13980

will u please check my Docker file.

#FROM nvidia/cuda:10.1-base-ubuntu18.04
FROM nvidia/cuda:11.2.0-cudnn8-runtime-ubuntu20.04
# FROM nvidia/cuda:11.3.1-cudnn8-runtime-ubuntu18.04
LABEL maintainer="https://github.com/mimbres/neural-audio-fp" 
RUN apt-get update
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH

RUN apt-get update --fix-missing && DEBIAN_FRONTEND=noninteractive apt-get install -y wget bzip2 ca-certificates \
    libglib2.0-0 libxext6 libsm6 libxrender1 \
    git mercurial subversion

# Miniconda3
RUN wget --quiet \
    https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh \
    && /bin/bash ~/miniconda.sh -b -p /opt/conda \
    && rm ~/miniconda.sh && \ 
    ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
    echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
    echo "conda activate base" >> ~/.bashrc

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libopenblas-dev

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y curl grep sed dpkg git tmux nano htop&& \
    TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` && \
    curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb && \
    dpkg -i tini.deb && \
    rm tini.deb && \
    apt-get clean

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip
RUN DEBIAN_FRONTEND=noninteractive pip3 install --upgrade pip

COPY environment.yml /tmp/
RUN conda env create -f /tmp/environment.yml
       
RUN mkdir /work && mkdir /work/neural-audio-fp-dataset
WORKDIR /work
RUN git clone https://github.com/mimbres/neural-audio-fp.git ./neural-audio-fp

RUN echo "cd /work/" >> ~/.bashrc
RUN echo "conda activate fp" >> ~/.bashrc
RUN echo "conda env list" >> ~/.bashrc
CMD [ "/bin/bash" ]

The ERROR is
 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     9    0     9    0     0     27      0 --:--:-- --:--:-- --:--:--    27
dpkg-deb: error: 'tini.deb' is not a Debian format archive
dpkg: error processing archive tini.deb (--install):
 dpkg-deb --control subprocess returned error exit status 2
Errors were encountered while processing:
 tini.deb
The command '/bin/sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y curl grep sed dpkg git tmux nano htop&&     TINI_VERSION=`curl https://github.com/krallin/tini/releases/latest | grep -o "/v.*\"" | sed 's:^..\(.*\).$:\1:'` &&     curl -L "https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini_${TINI_VERSION}.deb" > tini.deb &&     dpkg -i tini.deb &&     rm tini.deb &&     apt-get clean' returned a non-zero code: 1

It seems something went wrong in the download. However, according to this, tini.deb is no longer required for Docker >=1.13. Just remove the line of scripts for tini.deb installation.