FROM simbricks/simbricks:latest
RUN mv sims/external/gem5 sims/external/gem5-old \
 && git submodule update --init sims/external/gem5 \
 && make -j `nproc` sims/external/gem5/ready GEM5_VARIANT=opt \
 && mv sims/external/gem5/build/X86/gem5.opt \
       sims/external/gem5-old/build/X86/gem5.opt \
 && rm -rf sims/external/gem5 \
 && mv sims/external/gem5-old sims/external/gem5
