Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions to install on macOS #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/__pycache__/*
sample_frames/*.png
.venv
29 changes: 25 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The pretrained network is a 16-bit quantized weight and state CNN.
* CUDA 10.2+ or whatever comes with tensorflow install
- Keras: 2.5.0
- pyaer https://github.com/duguyue100/pyaer

* sensors DAVIS camera
* Robot hand with Arduino control via USB serial port bytes if you want to see the hand move; see project https://github.com/SensorsINI/DextraRoshamboHand

Expand All @@ -23,13 +23,13 @@ Project includes pycharm _.idea/_ folder and vscode _.vscode/_ folder.

### Make a conda environment
Create the environment, activate it, then in it install the libraries. We recommend you use conda because it will download the necessary python version 3.9. (That
is the last python version to have tensorflow 2.5.0 which this project uses.)
is the last python version to have tensorflow 2.5.0 which this project uses.)
``` bash
conda create -n roshambo python=3.9
conda activate roshambo
```
### Other requirements
See requirements.txt for libraries needed.
See requirements.txt for libraries needed.
Install them to the new conda env from the conda prompt with

``` bash
Expand All @@ -39,6 +39,27 @@ pip install -f requirements.txt

If you have trouble with pyaer, see https://github.com/duguyue100/pyaer. It should work for linux and mac OS intel silicon machines. Windows probably will not work natively, but you can run the code in a WSL2 Ubuntu virtual machine using https://github.com/dorssel/usbipd-win to map the USB port to WSL2 Ubuntu.

## macOS setup with venv

1. Install Homebrew (https://brew.sh)
2. Install Python 3.9 and libcaer
```sh
brew install [email protected]
brew tap inivation/inivation
brew install libcaer --with-opencv --with-libserialport
```
3. Create a virtual environment
```sh
cd dextra-roshambo-python
python3.9 -m venv .venv
source .venv/bin/activate
```
4. Install the dependencies
```sh
pip install -r requirements.txt
```


# Running Dextra

Run _roshambo_; it uses multiprocessing to launch 2 subprocessees, _producer_ and _consumer_. (You can run these separately for testing.)
Expand All @@ -51,5 +72,5 @@ Run two processes, producer and consumer.
```bash
python -m roshambo
```


2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ engineering_notation
pyyaml
opencv-python
# torch
keras==2.5.0
keras==2.5.0rc0
tensorflow==2.5.0 # requires python==3.9
tensorflow-model-optimization # pip install --user --upgrade
pyaer # needs libcaer; can be installed with sudo apt-get install libcaer-dev, otherewise see https://gitlab.com/inivation/dv/libcaer; see https://github.com/duguyue100/pyaer