Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Use 16.04 as it is the current linux default in the travis build
# https://github.com/fastlmm/FaST-LMM/blob/master/.travis.yml
FROM ubuntu:16.04

# gcc and g++ are critical dependencies for pysnptools
RUN apt-get update && \
apt-get install -y wget gcc g++ && \
rm -rf /var/lib/apt/lists/*

# Install conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.7.12-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean -tipsy && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc && \
find /opt/conda/ -follow -type f -name '*.a' -delete && \
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \
/opt/conda/bin/conda clean -afy && \
chown -R $USERNAME:$USERNAME /opt/conda

# Initialize environment
ENV PATH /opt/conda/bin:$PATH
RUN conda create -n fastlmm python=3.7
RUN conda init bash
RUN echo "conda activate fastlmm" >> ~/.bashrc
ENV PATH /opt/conda/envs/fastlmm/bin:$PATH
RUN conda install -n fastlmm "mkl==2019.4" "scipy>=1.1.0" "numpy>=1.11.3" jupyter

# While not ideal, pysnptools/fastlmm should be installed separately via pip
# See: https://github.com/fastlmm/FaST-LMM/issues/6#issuecomment-598458316
RUN /opt/conda/envs/fastlmm/bin/pip install pysnptools --no-use-pep517
RUN /opt/conda/envs/fastlmm/bin/pip install fastlmm

# Initialize some working directory for bind mounts
RUN mkdir /work
WORKDIR /work
24 changes: 24 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Docker Instructions

To build the docker container, run:

```bash
cd FaST-LMM/docker
docker build -t fastlmm .
```

The container has no entry point but jupyter will be installed so
a common use case for execution is:

```bash
# Mount local repo copy for access to datasets
REPO_DIR=$HOME/repos/FaST-LMM
docker run --rm -p 8888:8888 -it \
-v $REPO_DIR:/work/FaST-LMM \
fastlmm /bin/bash

# In container:
(fastlmm)> jupyter notebook --ip=0.0.0.0 --no-browser --allow-root --NotebookApp.token=''

# Use notebook at localhost:8888
```
1,051 changes: 1,051 additions & 0 deletions tests/notebooks/.ipynb_checkpoints/synth_export-checkpoint.ipynb

Large diffs are not rendered by default.

1,921 changes: 1,921 additions & 0 deletions tests/notebooks/synth-01/.ipynb_checkpoints/export-checkpoint.ipynb

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions tests/notebooks/synth-01/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### FaST-LMM Synthetic Data Export 01

Export results and data from first example in: https://nbviewer.jupyter.org/github/fastlmm/FaST-LMM/blob/master/doc/ipynb/FaST-LMM.ipynb

The model parameterization is modified slightly in this case to disable LOCO fitting for proximal contamination control as well as heritability parameter optimization (the parameter is provided rather than optimized for). This should make discrepancies with alternative implementations smaller.
Binary file added tests/notebooks/synth-01/data.nc
Binary file not shown.
Loading