Skip to content

Commit e46a248

Browse files
authored
Merge pull request #322 from arayabrain/feature/fix-microscope-env
Feature/fix microscope env
2 parents a0c48a4 + 6911c33 commit e46a248

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

docs/gui/workflow.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ You may not want to modify your original data folder, or you may want to make yo
229229
230230
- get the C library files from the manufacturer's support.
231231
- use OptiNiSt by :ref:`developer mode <each-platforms-for-developer>`.
232-
- put the libraries into ``optinist/studio/app/optinist/microscopes/dll/{nikon | olympus}/{linux | windows}/``
232+
- set environment value ``MICROSCOPES_LIBRARY_DIR`` in ``studio/config/.env`` to your library path.
233+
- put the libraries into ``MICROSCOPES_LIBRARY_DIR/dll/{nikon | olympus}/{linux | windows}/``
234+
- If you use Linux, open ``studio/app/optinist/wrappers/optinist/conda/microscope.yaml`` and uncomment the ``- gcc=12`` line.
233235
```
234236

235237
<p align="center">

studio/app/dir_path.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
22
from enum import Enum
33

4+
from dotenv import load_dotenv
5+
46
_DEFAULT_DIR = "/tmp/studio"
57
_ENV_DIR = os.environ.get("OPTINIST_DIR")
68

@@ -23,6 +25,8 @@ class DIRPATH:
2325
STUDIO_DIR = os.path.dirname(os.path.dirname(__file__))
2426
APP_DIR = os.path.dirname(__file__)
2527
CONFIG_DIR = f"{STUDIO_DIR}/config"
28+
if os.path.isfile(f"{CONFIG_DIR}/.env"):
29+
load_dotenv(f"{CONFIG_DIR}/.env")
2630

2731
CONDAENV_DIR = (
2832
f"{os.path.dirname(os.path.dirname(os.path.dirname(__file__)))}/conda"

studio/app/optinist/wrappers/optinist/conda/microscope.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
channels:
2+
- conda-forge
13
dependencies:
24
- python=3.9
5+
# NOTE: Uncomment the following line if you want to use .nd2 .oir files on linux
36
# - gcc=12
47
- pip
58
- pip:

studio/config/.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ IS_STANDALONE=True
1010
# MYSQL_DATABASE=studio
1111
# MYSQL_USER=studio_db_user
1212
# MYSQL_PASSWORD=studio_db_password
13+
14+
# NOTE: Uncomment and set your own values when using .nd2 or .oir reader
15+
# MICROSCOPES_LIBRARY_DIR="/app/studio/app/optinist/microscopes/dll"

0 commit comments

Comments
 (0)