Skip to content

Commit

Permalink
Restore and Update Dockerfile (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftp authored Feb 21, 2020
1 parent fe275e1 commit 05ac496
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 4 deletions.
3 changes: 1 addition & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
build/
tests/test_resources
build/
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM python:3.6-slim-stretch

RUN mkdir -p /python-deps/Willump

RUN apt-get update
RUN apt-get install -y build-essential curl
RUN apt-get update

RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc

RUN apt-get install -y zlib1g-dev wget software-properties-common
RUN wget https://apt.llvm.org/llvm-snapshot.gpg.key -O bob.key
RUN apt-key add bob.key
RUN apt-add-repository "deb http://apt.llvm.org/stretch/ llvm-toolchain-stretch-6.0 main"
RUN apt-get update
RUN apt-get install -y llvm-6.0-dev clang-6.0
RUN ln -s /usr/bin/llvm-config-6.0 /usr/local/bin/llvm-config
RUN ln -s /usr/bin/clang++-6.0 /usr/local/bin/clang++

RUN apt-get install -y gcc git
ENV PATH="/root/.cargo/bin:${PATH}"
RUN git clone https://github.com/stanford-futuredata/weld-willump.git
WORKDIR "/weld-willump"
RUN git checkout llvm-st
RUN cargo build --release

ENV WELD_HOME=/weld-willump
RUN pip install setuptools
WORKDIR "/weld-willump/python/pyweld"
RUN python setup.py install
WORKDIR "/"
RUN cp weld-willump/target/release/libweld.so /usr/lib/libweld.so

ADD $WILLUMP_HOME/tests /python-deps/Willump/tests
ADD $WILLUMP_HOME/willump /python-deps/Willump/willump
ADD $WILLUMP_HOME/cppextensions /python-deps/Willump/cppextensions
ADD $WILLUMP_HOME/requirements.txt /python-deps/Willump
ADD $WILLUMP_HOME/setup.py /python-deps/Willump
ADD $WILLUMP_HOME/simple_benchmarks.sh /python-deps/Willump

ENV WILLUMP_HOME=/python-deps/Willump

WORKDIR "/python-deps/Willump"
RUN pip install -r requirements.txt
RUN python setup.py install --user
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,18 @@ To confirm Willump works, run the Willump unit tests:
python3 setup.py test

For information on reproducing the experiments run in the Willump paper, please see our
[benchmarks guide](https://github.com/stanford-futuredata/Willump/blob/master/BENCHMARKS.md).
[benchmarks guide](https://github.com/stanford-futuredata/Willump/blob/master/BENCHMARKS.md).

## Docker

You can also experiment with Willump using Docker with the Dockerfile we provide. To clone our repository
and build our container, run:

git clone https://github.com/stanford-futuredata/Willump.git
cd Willump
export WILLUMP_HOME=`pwd`
docker build -t willump .

Then, to verify the container built successfully, run our unit tests:

docker run -t willump python setup.py test
2 changes: 1 addition & 1 deletion tests/benchmark_scripts/music_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def create_featureset(folder):

# add latent features
y_pred = np.hstack(add_features_and_predict(folder, combi))
print("Train AUC: %f" % willump_score_function(y, y_pred))
print("Validation AUC: %f" % willump_score_function(y, y_pred))


if __name__ == '__main__':
Expand Down

0 comments on commit 05ac496

Please sign in to comment.