Developing for ML Hub on Tapis UI - tapis-project/tapis-ui GitHub Wiki
The notes below are also available on my Notion notes
- Docker version 24.0.5 or above | installation
- Install NVM
- Ensure you are using the appropriate version of Node + NPM, use
nvmto manage dependencies as below:nvm install v22.2.0nvm use v22.2.0
- As ML Hub API is deployed on
NGINXit will now automatically proxy authentication based on tenant.
- On your local copy of the
tapis-uirepository, pull the latest version ofdevbranch by running the commandgit pull origin dev - Create a new git branch based on your task following naming convention of
task/TUI-<issue#>--<description>for example:git checkout -b task/TUI-373--mlhub-inference-info - If this is the first time you are running the project on the new
taskbranch, follow the steps in sequence:-
Create a
.envfile at the roottapis-uifolder, defining environment variables as below:VITE_SERVERLESS_DEPLOYMENT = "false" VITE_TAPIS_BASE_URL = "https://dev.develop.tapis.io"
-
Run the command
npm run init-projectfrom the roottapis-uifolder -
TapisUI will open on http://localhost:3000/#/
-
- If you had previously ran the project in your machine (for your current
taskbranch) by following the steps in #3- Use the command
npm run dev - If you did not encounter any errors so far, TapisUI will open on http://localhost:3000/#/
- Use the command
Follow these steps if you encountered errors
- To prevent errors delete
node_modulesanddistfolders as well aspackage-lock.jsonfile in each subfolders in thelibfolder - In the root
tapis-uifolder, delete thenode_modulesfolder andpackage-lock.jsonfile - Check the
/tmpfolder in your machine (usecd /tmpcommand to navigate) - if there is atapisui-extensions-corefolder there, use the commandrm -rf tapisui-extensions-coreto delete it - Run the command
npm run init-projectfrom the roottapis-uifolder
Another way to run the app if you encountered error using previous method
- On your terminal, run the command
cd packages/tapisui-hooksto navigate topackages>tapis-hooks - From within the
tapis-hooksdirectory, run the commandnpm install, followed by the commandnpm run buildto rebuildtapis-hooks - On your terminal, run the command
cd ../../to navigate back to thetapis-uiroot directory - In the root directory of
tapis-uirunnpm installfollowed bynpm run start
- Change the version number of the npm packages in the
package.jsoninside:-
tapis-uiroot directory -
packages>tapisui-api -
packages>tapisui-hooks -
packages>tapisui-common
-
- Follow the same steps as outlined in "Developing & running Tapis UI locally"
WARNING - Do this after you are done developing your feature for your current task branch and about to submit a PR Request:
- Prior to submitting Pull Request run the linter on the root directory of
tapis-ui: runnpm run prettierfollowed by annpm run lint- This step ensures that the Github tests on the PR will run smoothly
If the PR is approved & merged to dev branch, you can check https://tacc.develop.tapis.io/tapis-ui/#/ml-hub to see if the feature is working as expected