File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,36 @@ function prepare_conda_env_gpu_cuda9() {
4141}
4242
4343
44+ function prepare_conda_env_mac() {
45+ # This needs to be executed on a Mac
46+ source ${CONDA_PATH}
47+ conda env remove --name roosterize-mac
48+ conda create --name roosterize-mac python=3.7 pip -y
49+ conda activate roosterize-mac
50+ conda install -y pytorch==1.1.0 torchvision==0.3.0 -c pytorch
51+ pip install -r requirements.txt
52+ conda env export --no-builds > conda-envs/mac-cpu.yml
53+ }
54+
55+
56+ function package_dist() {
57+ # The package environment is special: we still use conda as a
58+ # virtual environment, but everything should be installed
59+ # using pip otherwise PyInstaller will not recognize.
60+ #
61+ # requirements.txt contains the right CPU-only pytorch
62+ # packages for installation
63+ source ${CONDA_PATH}
64+ conda env remove --name roosterize-package
65+ conda create --name roosterize-package python=3.7 pip -y
66+ conda activate roosterize-package
67+ pip install -r requirements.txt
68+ pip install pyinstaller==4.1
69+ make clean package
70+ # Package output will be at dist/roosterize.tgz
71+ }
72+
73+
4474# ==========
4575# Main function -- program entry point
4676# This script can be executed as ./run.sh the_function_to_run
You can’t perform that action at this time.
0 commit comments