lava / matplotlib-cpp

Extremely simple yet powerful header-only C++ plotting library built on the popular matplotlib
MIT License
4.28k stars 1.12k forks source link

How to use in Docker #299

Open makinzm opened 2 years ago

makinzm commented 2 years ago

I create this Dockerfile, but it doesn't work :

FROM ubuntu:20.04

ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Tokyo

RUN apt-get update && \
    apt-get install -y zsh time tzdata tree git curl

RUN apt-get update && \
    apt-get install -y gcc-9 g++-9 vim

RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 30 && \
    update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 30 

RUN apt-get install python-matplotlib python-numpy python2.7-dev

WORKDIR /root/files

CMD bash

Error :

[+] Building 26.0s (8/9)                 
 => [internal] load build definiti  0.1s
 => => transferring dockerfil 504B  0.0s
 => [internal] load .dockerignore   0.1s
 => => transferring context: 2B     0.0s
 => [internal] load metadata for d  1.2s
 => [1/6] FROM docker.io/library/u  0.0s
 => CACHED [2/6] RUN apt-get updat  0.0s
 => CACHED [3/6] RUN apt-get updat  0.0s
 => CACHED [4/6] RUN update-altern  0.0s
 => ERROR [5/6] RUN apt-get insta  24.3s
------                                   
 > [5/6] RUN apt-get install python-matplotlib python-numpy python2.7-dev:        
#8 2.462 Reading package lists...        
#8 22.37 Building dependency tree...     
#8 23.27 Reading state information...    
#8 24.04 Package python-matplotlib is not available, but is referred to by another package.
#8 24.04 This may mean that the package is missing, has been obsoleted, or
#8 24.04 is only available from another source
#8 24.04 
#8 24.11 E: Package 'python-matplotlib' has no installation candidate
------
executor failed running [/bin/sh -c apt-get install python-matplotlib python-numpy python2.7-dev]: exit code: 100

I would appreciate, if you would give me example code.