Skip to content

Commit

Permalink
fix windows install
Browse files Browse the repository at this point in the history
  • Loading branch information
bjarthur committed Sep 30, 2024
1 parent 5a4b3ec commit 4edeef7
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 18 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ privileges:
> $tbpath="<path-to-unzipped-executable>"
> [Environment]::SetEnvironmentVariable("SONGEXPLORER_BIN",
$tbpath + ";" +
$tbpath + "\bin\songexplorer\src;" +
$tbpath + "\Library\mingw-w64\bin;" +
$tbpath + "\Library\usr\bin;" +
$tbpath + "\Library\bin;" +
Expand Down Expand Up @@ -1925,7 +1926,7 @@ Then build:
To install directly from this local build:

$ conda create --name songexplorer
$ conda install -n songexplorer --use-local songexplorer -c conda-forge
$ conda install -n songexplorer --use-local songexplorer -c conda-forge -c nvidia

Pay attention to the notice at the end demarcated with "*** IMPORTANT
!!! ***". Follow the directions therein to install platform-specific
Expand Down
2 changes: 1 addition & 1 deletion app/DROP-FILES-HERE.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ setlocal

set tbpath=%~dp0\songexplorer

SET PATH=%tbpath%;%tbpath%\Library\mingw-w64\bin;%tbpath%\Library\usr\bin;%tbpath%\Library\bin;%tbpath%\Scripts;%tbpath%\bin;%PATH%
SET PATH=%tbpath%;%tbpath%\bin\songexplorer\src;%tbpath%\Library\mingw-w64\bin;%tbpath%\Library\usr\bin;%tbpath%\Library\bin;%tbpath%\Scripts;%tbpath%\bin;%PATH%

python.exe %~dp0\make-predictions.py %*

Expand Down
7 changes: 4 additions & 3 deletions app/make-predictions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@

use_aitch = True

_, *wavpaths = sys.argv
print("wavepaths = ", *wavpaths)

__dir__ = os.path.dirname(__file__)

sys.path.append(os.path.join(__dir__, "songexplorer", "bin", "songexplorer", "test"))
from libtest import wait_for_job

_, *wavpaths = sys.argv

sys.path.append(os.path.join(__dir__, "songexplorer", "bin", "songexplorer", "src", "gui"))
import model as M
import view as V
Expand Down Expand Up @@ -75,7 +76,7 @@ def do_it(wavfile):
V.waitfor.active = True
asyncio.run(C.ethogram_actuate())

logfile = wavfile+"-post-process.log"
logfile = M.trim_ext(wavfile)+"-post-process.log"
ncpu_cores, ngpu_cards, ngigabyes_memory = 1, 0, 8
localdeps = ["-d "+M.waitfor_job.pop()]
kwargs = {"process_group": 0} if sys.version_info.major == 3 and sys.version_info.minor >= 11 else {}
Expand Down
8 changes: 4 additions & 4 deletions install/conda/songexplorer/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ build:
requirements:
run:
- python <=3.10
- numpy
- numpy <2
- tensorflow >=2.8,<2.14 # [linux]
- cudatoolkit # [win]
- cudnn # [win]
- cuda-nvcc # [win]
- cudatoolkit=11 # [win]
- cudnn=8 # [win]
- cuda-nvcc=12 # [win]
- bokeh >=2,<3
- matplotlib-base
- natsort
Expand Down
8 changes: 4 additions & 4 deletions src/activations
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ from lib import log_nvidia_smi_output, select_GPUs
FLAGS = None

def main():
flags = vars(FLAGS)
for key in sorted(flags.keys()):
print('%s = %s' % (key, flags[key]))

os.environ['TF_DETERMINISTIC_OPS']=FLAGS.deterministic
os.environ['TF_DISABLE_SPARSE_SOFTMAX_XENT_WITH_LOGITS_OP_DETERMINISM_EXCEPTIONS']=FLAGS.deterministic
if FLAGS.deterministic:
Expand All @@ -88,10 +92,6 @@ def main():
sys.path.append(os.path.dirname(FLAGS.video_findfile))
video_findfile = importlib.import_module(os.path.basename(FLAGS.video_findfile)).video_findfile

flags = vars(FLAGS)
for key in sorted(flags.keys()):
print('%s = %s' % (key, flags[key]))

audio_read_plugin_kwargs = eval(FLAGS.audio_read_plugin_kwargs)
video_read_plugin_kwargs = eval(FLAGS.video_read_plugin_kwargs)

Expand Down
11 changes: 6 additions & 5 deletions src/classify
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ from lib import compute_background
FLAGS = None

def main():
flags = vars(FLAGS)
for key in sorted(flags.keys()):
print('%s = %s' % (key, flags[key]))

audio_tic_rate = FLAGS.audio_tic_rate

os.environ['TF_DETERMINISTIC_OPS']=FLAGS.deterministic
os.environ['TF_DISABLE_SPARSE_SOFTMAX_XENT_WITH_LOGITS_OP_DETERMINISM_EXCEPTIONS']=FLAGS.deterministic

Expand All @@ -87,11 +93,6 @@ def main():
return video_read_module.video_read(fullpath, start_frame, stop_frame,
**FLAGS.video_read_plugin_kwargs)

audio_tic_rate = FLAGS.audio_tic_rate

print('model = '+str(FLAGS.model))
print('audio_tic_rate = '+str(audio_tic_rate))

with open(FLAGS.model_labels, 'r') as fid:
model_labels = fid.read().splitlines()

Expand Down

0 comments on commit 4edeef7

Please sign in to comment.