To work with the frontend, switch the current folder to frontend
cd frontendUse npm to install dependencies:
npm installFor building the frontend, run:
npm run buildCopy the contents of the frontend/build directory to the backend directory (src/dstack/_internal/server/statics):
cp -r build/ ../src/dstack/_internal/server/statics/Now, if you've installed dstack in editable mode, you can simply run dstack server
and the frontend will be working.
dstack serverFor frontend development, run a webpack dev server:
npm run startThe webpack dev server expects the API to be running on http://127.0.0.1:8000. So ensure to run the API on port 8000:
dstack server --port 8000