Merge pull request #216 from atsman/master

Better dockerfile
This commit is contained in:
George Hotz 2019-05-11 20:33:20 -07:00 committed by GitHub
commit 87701a9896
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 9 deletions

View File

@ -4,20 +4,25 @@ FROM ubuntu:16.04
RUN apt-get update
RUN apt-get -y install build-essential git curl python python-virtualenv python-dev
# fetch qira
RUN git clone https://github.com/geohot/qira.git --depth=1
# qemu deps
RUN apt-get -y install pkg-config zlib1g-dev libglib2.0-dev libpixman-1-dev
WORKDIR /qira
# build qemu
RUN apt-get -y install pkg-config zlib1g-dev libglib2.0-dev libpixman-1-dev
RUN cd tracers && ./qemu_build.sh
# install python packages and link qira
# install python venv
RUN virtualenv venv
RUN bash -c 'source venv/bin/activate && pip install --upgrade pip'
# install python deps, this step will be cached
COPY ./requirements.txt ./requirements.txt
RUN bash -c 'source venv/bin/activate && pip install --upgrade -r requirements.txt'
#build qemu and link qira
COPY ./tracers ./tracers
RUN cd tracers && ./qemu_build.sh
RUN ln -sf /qira/qira /usr/local/bin/qira
COPY . .
# test will build Cython qiradb
RUN ./run_tests.sh

View File

@ -1,2 +1,2 @@
#!/bin/bash
docker build -t qira -f Dockerfile .
docker build -t qira -f Dockerfile ../