From 9651085731456e339144ba5b0fddacf91c8906e2 Mon Sep 17 00:00:00 2001 From: Berk Gercek Date: Mon, 16 Sep 2024 13:32:57 +0200 Subject: [PATCH] Update docker spec and remove pytorch deps --- brainwidemap/encoding/Dockerfile | 10 ++++++++-- brainwidemap/encoding/environment.yaml | 13 +------------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/brainwidemap/encoding/Dockerfile b/brainwidemap/encoding/Dockerfile index 61fc42d..88305d6 100644 --- a/brainwidemap/encoding/Dockerfile +++ b/brainwidemap/encoding/Dockerfile @@ -15,11 +15,17 @@ COPY ./environment.yaml /data/environment.yaml SHELL ["/bin/bash", "-c"] # For some reason ibllib.io.video needs opencv which requires libgl1-mesa-dev ¯\_(ツ)_/¯ RUN apt update && apt install -y wget git libgl1-mesa-dev -RUN wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" -RUN /bin/bash -c "bash Miniforge3-$(uname)-$(uname -m).sh -b -p /opt/conda && rm Mambaforge.sh" +RUN wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" +RUN bash Miniforge3.sh -b -p /opt/conda && rm Miniforge3.sh +RUN wget -O iblreq.txt "https://raw.githubusercontent.com/int-brain-lab/ibllib/master/requirements.txt" +RUN head -n -1 iblreq.txt > requirements.txt +RUN rm iblreq.txt RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && \ mamba install --yes conda-build &&\ mamba env create -n iblenv --file=environment.yaml" +RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && \ + conda activate iblenv && pip install -r requirements.txt && pip install ibllib --no-deps" +RUN rm requirements.txt # The below allows interactively running the container with the correct environment, but be warned # that this will not work with commands passed to the container in a non-interactive shell. # In the case of e.g. `docker run thiscontainer python myscript.py`, the environment will not diff --git a/brainwidemap/encoding/environment.yaml b/brainwidemap/encoding/environment.yaml index b8c2af4..490877f 100644 --- a/brainwidemap/encoding/environment.yaml +++ b/brainwidemap/encoding/environment.yaml @@ -4,7 +4,6 @@ dependencies: - ipython - matplotlib - numba - - numpy - pandas - scikit-learn - scipy >=1.4.1 @@ -12,14 +11,4 @@ dependencies: - statsmodels - tqdm - pip - - pip: - - iblutil - - ibllib - - iblapps - - ibl-neuropixel - - ONE-api - - phylib - - phy - - pynrrd - - slidingRP - - neurencoding + - pyqt<6