From 50863fc218f4452214a7f81f0388237ef30a66e3 Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Wed, 13 Nov 2024 13:21:09 -0800 Subject: [PATCH 01/14] try adding docker to workflow --- .github/workflows/build.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 24f44bb4..3f14fd1f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,8 @@ jobs: build: runs-on: group: LargerInstance + container: + image: rcpeene/openscope_databook:latest env: DANDI_API_KEY: ${{ secrets.DANDI_API_KEY }} @@ -28,20 +30,20 @@ jobs: # with: # python-version: "3.11" - - name: Upgrading pip - run: pip install --upgrade pip + # - name: Upgrading pip + # run: pip install --upgrade pip - - name: Install deps - run: pip install cython numpy + # - name: Install deps + # run: pip install cython numpy - name: pip freeze run: pip freeze - - name: Installing packages again (this prevents a weird error) - run: pip install -r requirements.txt + # - name: Installing packages again (this prevents a weird error) + # run: pip install -r requirements.txt - - name: Installing package - run: pip install -e . + # - name: Installing package + # run: pip install -e . - name: Installing build dependencies run: | From c5eb8ffedda1a902c365a99ba38ece3b42592f49 Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Wed, 13 Nov 2024 13:26:22 -0800 Subject: [PATCH 02/14] add docker to test --- .github/workflows/test.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6ad01d0f..b7eb5de4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,8 @@ jobs: test: runs-on: group: LargerInstance + container: + image: rcpeene/openscope_databook:latest env: DANDI_API_KEY: ${{ secrets.DANDI_API_KEY }} @@ -19,20 +21,20 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Upgrading pip - run: pip install --upgrade pip + # - name: Upgrading pip + # run: pip install --upgrade pip - name: print environment run: pip freeze - - name: Install cython - run: pip install cython numpy + # - name: Install cython + # run: pip install cython numpy - - name: Installing package - run: pip install -e . + # - name: Installing package + # run: pip install -e . - - name: Installing requirements - run: pip install -r ./requirements.txt + # - name: Installing requirements + # run: pip install -r ./requirements.txt - name: Installing build dependencies run: | From f7ab6a968d191040466c2afe4b2b264a8ce6dc63 Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Wed, 13 Nov 2024 13:28:02 -0800 Subject: [PATCH 03/14] fix typos --- .github/workflows/build.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f14fd1f..1a737d60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,8 +12,8 @@ jobs: build: runs-on: group: LargerInstance - container: - image: rcpeene/openscope_databook:latest + container: + image: rcpeene/openscope_databook:latest env: DANDI_API_KEY: ${{ secrets.DANDI_API_KEY }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7eb5de4..16ca6143 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,8 +11,8 @@ jobs: test: runs-on: group: LargerInstance - container: - image: rcpeene/openscope_databook:latest + container: + image: rcpeene/openscope_databook:latest env: DANDI_API_KEY: ${{ secrets.DANDI_API_KEY }} From 078a76342d763ada9770e55a6fa2e781ea862cbb Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Wed, 13 Nov 2024 15:02:39 -0800 Subject: [PATCH 04/14] add docker file --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..5ed16875 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:22.04 +# build dependencies +RUN apt-get update && apt-get install -y coreutils +RUN apt-get install -y python3 python3-pip +RUN apt-get install -y git + +# copy necessary databook files +# COPY databook_utils /databook_utils +# COPY data /data +# COPY docs /docs +# COPY setup.py /setup.py +# COPY requirements.txt /requirements.txt +# COPY README.md /README.md +# COPY LICENSE.txt /LICENSE.txt +RUN git clone https://github.com/AllenInstitute/openscope_databook.git + +# set up databook dependencies +RUN pip install numpy +RUN pip install cython +RUN pip install -e ./openscope_databook + +# # set up test suite dependencies +# RUN pip install jupyter-book markupsafe==2.0.1 jupyter==1.0.0 -U jupyter-book==1.0.0 nbmake==1.5.3 pytest-xdist==3.5.0 \ No newline at end of file From 82e69c5ebdfa579fcc076d7374b50de36801ed73 Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Thu, 14 Nov 2024 10:19:37 -0800 Subject: [PATCH 05/14] add required ubuntu libraries for cell_matching notebook --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ed16875..d32cf11a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,8 @@ FROM ubuntu:22.04 -# build dependencies -RUN apt-get update && apt-get install -y coreutils +# base requirements +RUN apt-get update && apt-get install -y coreutils +RUN apt-get install -y libgl1-mesa-glx +RUN apt-get install -y libglib2.0-0 RUN apt-get install -y python3 python3-pip RUN apt-get install -y git @@ -20,4 +22,4 @@ RUN pip install cython RUN pip install -e ./openscope_databook # # set up test suite dependencies -# RUN pip install jupyter-book markupsafe==2.0.1 jupyter==1.0.0 -U jupyter-book==1.0.0 nbmake==1.5.3 pytest-xdist==3.5.0 \ No newline at end of file +RUN pip install jupyter-book markupsafe==2.0.1 jupyter==1.0.0 -U jupyter-book==1.0.0 nbmake==1.5.3 pytest-xdist==3.5.0 \ No newline at end of file From 0ea9095a2a3b256c5567aca731fe172db3f98bf4 Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Fri, 15 Nov 2024 10:19:15 -0800 Subject: [PATCH 06/14] improve docker and add env dev tag to setup.py --- Dockerfile | 21 ++----- docs/embargoed/cell_matching.ipynb | 89 ++++++++++++------------------ setup.py | 12 +++- 3 files changed, 51 insertions(+), 71 deletions(-) diff --git a/Dockerfile b/Dockerfile index d32cf11a..d0c56d82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,16 @@ FROM ubuntu:22.04 # base requirements -RUN apt-get update && apt-get install -y coreutils +RUN apt-get update +RUN apt-get install -y coreutils RUN apt-get install -y libgl1-mesa-glx RUN apt-get install -y libglib2.0-0 RUN apt-get install -y python3 python3-pip RUN apt-get install -y git -# copy necessary databook files -# COPY databook_utils /databook_utils -# COPY data /data -# COPY docs /docs -# COPY setup.py /setup.py -# COPY requirements.txt /requirements.txt -# COPY README.md /README.md -# COPY LICENSE.txt /LICENSE.txt +# clone databook files RUN git clone https://github.com/AllenInstitute/openscope_databook.git +# for reasons I don't understand, these must be installed before the rest the requirements +RUN pip install numpy cython # set up databook dependencies -RUN pip install numpy -RUN pip install cython -RUN pip install -e ./openscope_databook - -# # set up test suite dependencies -RUN pip install jupyter-book markupsafe==2.0.1 jupyter==1.0.0 -U jupyter-book==1.0.0 nbmake==1.5.3 pytest-xdist==3.5.0 \ No newline at end of file +RUN pip install -e ./openscope_databook[dev] \ No newline at end of file diff --git a/docs/embargoed/cell_matching.ipynb b/docs/embargoed/cell_matching.ipynb index 4b12bae5..18d5433b 100644 --- a/docs/embargoed/cell_matching.ipynb +++ b/docs/embargoed/cell_matching.ipynb @@ -50,12 +50,10 @@ "import json\n", "import os\n", "\n", - "import matplotlib as mpl\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "\n", - "from PIL import Image\n", - "from time import sleep" + "from PIL import Image" ] }, { @@ -93,6 +91,13 @@ "id": "77d78e7d", "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "A newer version (0.63.1) of dandi/dandi-cli is available. You are using 0.61.2\n" + ] + }, { "name": "stdout", "output_type": "stream", @@ -255,66 +260,42 @@ "name": "stderr", "output_type": "stream", "text": [ - "c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\scipy\\__init__.py:169: UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.4\n", - " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n", "WARNING:root:many=True not supported from argparse\n", "INFO:NwayMatching:NWAY_COMMIT_SHA None\n", "INFO:NwayMatching:Nway matching version 0.6.0\n", - "c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\scipy\\__init__.py:169: UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.4\n", - " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n", - "c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\scipy\\__init__.py:169: UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.4\n", - " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n", - "c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\scipy\\__init__.py:169: UserWarning: A NumPy version >=1.18.5 and <1.26.0 is required for this version of SciPy (detected version 1.26.4\n", - " warnings.warn(f\"A NumPy version >={np_minversion} and <{np_maxversion}\"\n", "WARNING:root:many=True not supported from argparse\n", "WARNING:root:many=True not supported from argparse\n", "INFO:PairwiseMatching:Matching 1193675753 to 1194754135\n", "INFO:PairwiseMatching:Matching 1193675753 to 1194754135: best registration was ['Crop', 'CLAHE', 'PhaseCorrelate']\n", - "multiprocessing.pool.RemoteTraceback: \n", - "\"\"\"\n", - "Traceback (most recent call last):\n", - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\multiprocessing\\pool.py\", line 125, in worker\n", - " result = (True, func(*args, **kwds))\n", - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\multiprocessing\\pool.py\", line 48, in mapstar\n", - " return list(map(*args))\n", - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\nway\\nway_matching.py\", line 121, in pair_match_job\n", - " pair_match.run()\n", - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\nway\\pairwise_matching.py\", line 495, in run\n", - " segmask_moving_3d_registered = transform_mask(\n", - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\nway\\pairwise_matching.py\", line 384, in transform_mask\n", - " dtype=np.int)\n", - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\numpy\\__init__.py\", line 338, in __getattr__\n", - " raise AttributeError(__former_attrs__[attr])\n", - "AttributeError: module 'numpy' has no attribute 'int'.\n", - "`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.\n", - "The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n", - " https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations\n", - "\"\"\"\n", - "\n", - "The above exception was the direct cause of the following exception:\n", - "\n", - "Traceback (most recent call last):\n", - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\runpy.py\", line 196, in _run_module_as_main\n", - " return _run_code(code, main_globals, None,\n", - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\runpy.py\", line 86, in _run_code\n", - " exec(code, run_globals)\n", - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\nway\\nway_matching.py\", line 502, in \n", - " nmod.run()\n", - " File \"c:\\Users\\carter.peene\\Desktop\\Projects\\openscope_databook\\databook_env\\lib\\site-packages\\nway\\nway_matching.py\", line 462, in run\n", - " self.pair_matches = pool.map(pair_match_job, pair_arg_list)\n", - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\multiprocessing\\pool.py\", line 367, in map\n", - " return self._map_async(func, iterable, mapstar, chunksize).get()\n", - " File \"C:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\multiprocessing\\pool.py\", line 774, in get\n", - " raise self._value\n", - "AttributeError: module 'numpy' has no attribute 'int'.\n", - "`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.\n", - "The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:\n", - " https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations\n" + "c:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\nway\\utils.py:48: FutureWarning: In a future version of pandas all arguments of DataFrame.sort_index will be keyword-only.\n", + " df = df.sort_index(0)\n", + "c:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\nway\\utils.py:49: FutureWarning: In a future version of pandas all arguments of DataFrame.sort_index will be keyword-only.\n", + " df = df.sort_index(1)\n", + "INFO:NwayMatching:registration success(1) or failure (0):\n", + " 0 1\n", + "0 1 1\n", + "1 1 1\n", + "id map{\n", + " \"0\": 1193675753,\n", + " \"1\": 1194754135\n", + "}\n", + "c:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\nway\\nway_matching.py:208: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.\n", + " matching_frame = matching_frame.append(pairframe)\n", + "INFO:NwayMatching:Nway matching is done!\n", + "INFO:NwayMatching:Creating match summary plots\n", + "WARNING:root:setting Dict fields not supported from argparse\n", + "c:\\Users\\carter.peene\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\argschema\\utils.py:346: FutureWarning: '--nway_output.nway_matches' is using old-style command-line syntax with each element as a separate argument. This will not be supported in argschema after 2.0. See http://argschema.readthedocs.io/en/master/user/intro.html#command-line-specification for details.\n", + " warnings.warn(warn_msg, FutureWarning)\n", + "WARNING:root:many=True not supported from argparse\n", + "INFO:NwayMatching:wrote matching_output\\nway_match_fraction_plot_2024_11_14_13_37_50.png\n", + "INFO:NwayMatching:wrote matching_output\\nway_warp_overlay_plot_2024_11_14_13_37_50.png\n", + "INFO:NwayMatching:wrote matching_output\\nway_warp_summary_plot_2024_11_14_13_37_50.png\n", + "INFO:NwayMatching:wrote ./output.json\n" ] } ], "source": [ - "!python -m nway.nway_matching --input_json input.json --output_json \"./output.json\" --output_dir matching_output" + "!python3 -m nway.nway_matching --input_json input.json --output_json \"./output.json\" --output_dir matching_output" ] }, { @@ -385,7 +366,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 13, @@ -421,7 +402,7 @@ { "data": { "text/plain": [ - "" + "" ] }, "execution_count": 14, diff --git a/setup.py b/setup.py index 5289c5f8..da770fae 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -from setuptools import setup, find_packages +from setuptools import setup with open("README.md", encoding="utf-8") as f: readme = f.read() @@ -20,5 +20,13 @@ url="https://github.com/AllenInstitute/openscope_databook", license=license, package_dir={"databook_utils": "databook_utils"}, - install_requires=required + install_requires=required, + extras_require={ + "dev": [ + "markupsafe==2.0.1", + "jupyter-book==1.0.0", + "nbmake==1.5.3", + "pytest-xdist==3.5.0" + ] + } ) From c38c9e55e5eda9d92c69ea99898724e21a936ad0 Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Fri, 15 Nov 2024 14:49:04 -0800 Subject: [PATCH 07/14] don't git clone in docker to get files (then it will run older notebooks (from main) in the github workflows and not from the branch being tested --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d0c56d82..31a0cd7d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,11 @@ RUN apt-get install -y libglib2.0-0 RUN apt-get install -y python3 python3-pip RUN apt-get install -y git -# clone databook files -RUN git clone https://github.com/AllenInstitute/openscope_databook.git +# copy databook files +COPY requirements.txt ./openscope_databook/requirements.txt +COPY setup.py ./openscope_databook/setup.py +COPY README.md ./openscope_databook/README.md +COPY LICENSE.txt ./openscope_databook/LICENSE.txt # for reasons I don't understand, these must be installed before the rest the requirements RUN pip install numpy cython From 1e6c20d72bf8c140d55afa73eabf285ca36dacdf Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Fri, 15 Nov 2024 16:42:37 -0800 Subject: [PATCH 08/14] include databook utils in env --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 31a0cd7d..8eaf410e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,12 @@ RUN apt-get install -y libglib2.0-0 RUN apt-get install -y python3 python3-pip RUN apt-get install -y git -# copy databook files +# copy databook setup files COPY requirements.txt ./openscope_databook/requirements.txt COPY setup.py ./openscope_databook/setup.py COPY README.md ./openscope_databook/README.md COPY LICENSE.txt ./openscope_databook/LICENSE.txt +COPY databook_utils ./openscope_databook/databook_utils # for reasons I don't understand, these must be installed before the rest the requirements RUN pip install numpy cython From 2c209b1223621a2d10c1bf01c58f5dd91278119e Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Mon, 18 Nov 2024 09:32:58 -0800 Subject: [PATCH 09/14] try workflow checking our branch to push to --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a737d60..2638adf7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: main + ref: GITHUB_REF # - name: Set up Python # uses: actions/setup-python@v4 From 7e1bea10cb71400657adf28c2ec41a7a6eb5cc7e Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Mon, 18 Nov 2024 10:15:48 -0800 Subject: [PATCH 10/14] fix variable name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2638adf7..705094b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - ref: GITHUB_REF + ref: ${{ github.ref }} # - name: Set up Python # uses: actions/setup-python@v4 From 302d2c1af30f675bc480288a4a306617363f2451 Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Mon, 18 Nov 2024 10:48:28 -0800 Subject: [PATCH 11/14] restore linderman version of ssm --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 93d4bb91..e605ad5c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,7 @@ quantities==0.14.1 remfile==0.1.10 scikit-image==0.19.3 scipy==1.9.3 -ssm +ssm @ git+https://github.com/lindermanlab/ssm statsmodels==0.14.0 suite2p==0.12.1 tensortools==0.4 From a24bccbe2a8c87311f3a4f8138ea959c17789a8e Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Tue, 19 Nov 2024 12:06:26 -0800 Subject: [PATCH 12/14] pin autograd --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index e605ad5c..28d1ebe4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ +autograd==1.3 ccfwidget==0.5.3 cebra cython From 5660323465c657b0ac64a37365d1a1816a7d0d88 Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Tue, 19 Nov 2024 21:21:56 -0800 Subject: [PATCH 13/14] fix docker bug and add docker usage instructions --- Dockerfile | 2 ++ docs/intro.md | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8eaf410e..562e8f3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,8 @@ RUN apt-get install -y libglib2.0-0 RUN apt-get install -y python3 python3-pip RUN apt-get install -y git +RUN git config --global --add safe.directory /__w/openscope_databook/openscope_databook + # copy databook setup files COPY requirements.txt ./openscope_databook/requirements.txt COPY setup.py ./openscope_databook/setup.py diff --git a/docs/intro.md b/docs/intro.md index c29f1b55..62154390 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -97,7 +97,9 @@ You can download an individual notebook by pressing the `Download` button in the ``` pip install -e . ``` -It is recommended that this is done within a conda environment using Python 3.10 to minimize any interference with local machine environments. For information on installing and using conda, go [here](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html). *Before* running the pip installation above, you can create a conda environment in the conda prompt with the command + +#### Locally (Conda) +It is recommended that this is done within a conda environment using Python 3.10 or Docker to minimize any interference with local machine environments. For information on installing and using conda, go [here](https://conda.io/projects/conda/en/latest/user-guide/getting-started.html). *Before* running the pip installation above, you can create a conda environment in the conda prompt with the command ``` conda create -n databook_env python=3.10 ``` @@ -106,6 +108,22 @@ and you can run that environment with conda activate databook_env ``` + +#### Locally (Docker) +The Databook also includes a dockerfile. If you want to build a docker container for the Databook yourself (for some reason), you can do so by running the following command in the Databook main directory after you have docker installed and running +``` +docker build -t openscope_databook +``` +You can then activate the docker by running the following command. Note that, to access the databook in your host machine's web browser, the port 8888 should be mapped to the docker container's port. +``` +docker run -p 8888:8888 openscope_databook +``` +Instead of building the container yourself, you can use the main docker container that we maintain, registered publically on Docker hub with the following command +``` +docker run -p 8888:8888 rcpeene/openscope_databook:latest +``` + +#### Locally (Running Notebook) Once you environment is setup, you can execute the notebooks in Jupyter by running the following command within the repo directory; ``` Jupyter notebook From ede92f49043f7dff1cbc5e06f403501cf41446cf Mon Sep 17 00:00:00 2001 From: Carter Peene Date: Wed, 20 Nov 2024 09:11:19 -0800 Subject: [PATCH 14/14] fix git perm issue --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 705094b4..7220ee29 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,9 @@ jobs: rm ./docs/embargoed/*.nwb - name: Printing log - run: git status + run: | + git config --global --add safe.directory /__w/openscope_databook/openscope_databook + git status - name: Printing shortlog run: git log | git shortlog -sn