Skip to content

Commit

Permalink
Merge pull request #45 from stanfordnmbl/conda-cmake
Browse files Browse the repository at this point in the history
cmake in conda
  • Loading branch information
antoinefalisse authored Dec 16, 2022
2 parents a682e30 + e963e62 commit 09dc1a3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
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

0 comments on commit 09dc1a3

Please sign in to comment.