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

cmake in conda #45

Merged
merged 5 commits into from
Dec 16, 2022
Merged
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
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ Archived code base corresponding to publication: https://zenodo.org/record/74199
- Clone the repository: `git clone https://github.com/stanfordnmbl/opencap-processing.git`
- Navigate to the directory: `cd opencap-processing`
7. Install required packages: `python -m pip install -r requirements.txt`

8. Run `python createAuthenticationEnvFile.py`
- An environment variable (`.env` file) will be saved after authenticating.

### Muscle-driven simulations
1. Install [CMake](https://cmake.org/download/)
- **Windows only**: Add CMake to system path. During the installation, select *Add CMake to the system PATH for all users*
2. **Windows only**: Install [Visual Studio](https://visualstudio.microsoft.com/downloads/)
1. **Windows only**: Install [Visual Studio](https://visualstudio.microsoft.com/downloads/)
- The Community variant is sufficient and is free for everyone.
- During the installation, select the *workload Desktop Development with C++*.
- The code was tested with the 2017, 2019, and 2022 Community editions.
3. Run `createAuthenticationEnvFile.py`
- An environment variable (`.env` file) will be saved after authenticating.
2. **Linux only**: Install OpenBLAS libraries
- `sudo apt-get install libopenblas-base`


## Examples
- Run `example.py` for examples of how to run kinematic analyses
Expand All @@ -53,6 +53,4 @@ Archived code base corresponding to publication: https://zenodo.org/record/74199

### Locally
- Follow the install requirements above
- (Optional): Run `createAuthenticationEnvFile.py`
- An environment variable (`.env` file) will be saved after authenticating. You can proceed without this, but you will be required to login every time you run a script.
- Open `batchDownload.py` and follow the instructions
4 changes: 2 additions & 2 deletions UtilsDynamicSimulations/OpenSimAD/utilsOpenSimAD.py
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ def buildExternalFunction(filename, pathDCAD, CPP_DIR, nInputs,
cmd_tar = 'tar -xf linux.tar.gz -C "{}"'.format(OpenSimAD_DIR)
os.system(cmd_tar)
os.remove('linux.tar.gz')
cmd1 = 'cmake "' + pathBuildExpressionGraph + '" -DTARGET_NAME:STRING="' + filename + '" -DSDK_DIR:PATH="' + OpenSimADOS_DIR + '" -DCPP_DIR:PATH="' + CPP_DIR + '" -DCMAKE_INSTALL_PREFIX= "' + OpenSimADOS_DIR + '"'
cmd1 = 'cmake "' + pathBuildExpressionGraph + '" -DTARGET_NAME:STRING="' + filename + '" -DSDK_DIR:PATH="' + OpenSimADOS_DIR + '" -DCPP_DIR:PATH="' + CPP_DIR + '"'
cmd2 = "make"
BIN_DIR = pathBuild

Expand All @@ -1606,7 +1606,7 @@ def buildExternalFunction(filename, pathDCAD, CPP_DIR, nInputs,
cmd_tar = 'tar -xf macOS.tgz -C "{}"'.format(OpenSimAD_DIR)
os.system(cmd_tar)
os.remove('macOS.tgz')
cmd1 = 'cmake "' + pathBuildExpressionGraph + '" -DTARGET_NAME:STRING="' + filename + '" -DSDK_DIR:PATH="' + OpenSimADOS_DIR + '" -DCPP_DIR:PATH="' + CPP_DIR + '" -DCMAKE_INSTALL_PREFIX= "' + OpenSimADOS_DIR + '"'
cmd1 = 'cmake "' + pathBuildExpressionGraph + '" -DTARGET_NAME:STRING="' + filename + '" -DSDK_DIR:PATH="' + OpenSimADOS_DIR + '" -DCPP_DIR:PATH="' + CPP_DIR + '"'
cmd2 = "make"
BIN_DIR = pathBuild

Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ maskpass==0.3.6
requests
casadi
pyyaml
joblib
joblib
cmake