sudo docker run -v /home/user/riscv:/workspace -it ubuntu:18.04
apt update
apt-get install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
apt install git
cd /workspace
git clone <https://github.com/riscv/riscv-gnu-toolchain>
cd riscv-gnu-toolchain
./configure --with-arch=rv32i --disable-multilib --prefix=/workspace/bin
make -j4