The easiest way to get started is using Docker Compose, which sets up the Next.js application, PostgreSQL database, and LocalStack for an S3 simulation:
# Start all services (app + PostgreSQL + LocalStack)docker compose up# In another terminal, seed the database (first time only)docker compose exec app npm run db:seed
You can interact with the LocalStack S3 bucket using AWS CLI commands via Docker:
# List all bucketsdocker compose exec localstack awslocal s3 ls# List contents of the bucketdocker compose exec localstack awslocal s3 ls s3://local-bucket# Show file content from the bucketdocker compose exec localstack awslocal s3 cp s3://local-bucket/your-file.json -
Note: When running everything in Docker Compose, the DATABASE_URL uses db as the hostname. The connection string is automatically set to: postgresql://postgres:postgres@db:5432/studio_development
You can run the database in Docker while running the application locally for faster development:
# Start only the database servicedocker compose up -d db# In another terminal, set up and run the app locallycd inference-studionpm install# Create a .env file with DATABASE_URL using localhost (not 'db')# Example: DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres# Create prisma client, schema, and populate with sample datanpm run db:generatenpm run db:pushnpm run db:seed# Start development servernpm run dev
Must be exactly 64 hexadecimal characters (256 bits).
Must be the same across all application and worker instances.
Set it as an environment variable (MASTER_KEY=your_64_character_hex_string_here).
The docker-compose.yml includes a default development key. For production, set MASTER_KEY in your environment before running.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Neurometric AI","colors":{"primary":"#b8b8b8","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/neurometricai/RO81h8yf4_CFu7MN/logo/light.png?fit=max\u0026auto=format\u0026n=RO81h8yf4_CFu7MN\u0026q=85\u0026s=b26ba3de71cd835fecad1d387d119f5b","dark":"https://mintcdn.com/neurometricai/ubjCspXq8S7QVf2w/logo/dark.svg?fit=max\u0026auto=format\u0026n=ubjCspXq8S7QVf2w\u0026q=85\u0026s=6ddba9a681676af1ac97012d9938078f"},"favicon":"https://mintlify.s3.us-west-1.amazonaws.com/neurometricai/images/light.png","navbar":{"links":[{"href":"mailto:sales@neurometric.ai","label":"Support"}],"primary":{"type":"button","label":"Playground","href":"https://marketplace.neurometric.ai/playground"}},"footer":{"socials":{"x":"https://x.com/NeurometricAI","github":"https://github.com/NeurometricAI","linkedin":"https://linkedin.com/company/neurometricai"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://mintlify.com/docs"},{"anchor":"Blog","icon":"newspaper","href":"https://mintlify.com/blog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"neurometricai","hasAudioNarration":false,"actualSubdomain":"neurometricai","customDomains":["docs.neurometric.ai"],"gitSource":{"type":"github","owner":"neurometricai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae945bd3a5425ee311be369:success","clientVersion":"0.0.4117","searchFilterCounts":[{"language":"default","tag":"Guides","count":8},{"language":"default","tag":"SLM Marketplace","count":3},{"language":"default","tag":"Inference Studio","count":3},{"language":"default","tag":"Getting started","count":2},{"language":"default","tag":"API reference","count":1},{"language":"default","tag":"API documentation","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"studio/setup","slug":"/studio/setup","pageMetadata":{"title":"Local Setup","description":"How to run the Inference Studio locally for development.","href":"/studio/setup"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"How to run the Inference Studio locally for development.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`setup-guide`,children:`Setup Guide`}),`\n`,_jsx(_components.p,{children:`There are several ways to run the Inference Studio locally, depending on your workflow.`}),`\n`,_jsx(Heading,{level:`2`,id:`using-docker-compose-recommended`,children:`Using Docker Compose (Recommended)`}),`\n`,_jsx(_components.p,{children:`The easiest way to get started is using Docker Compose, which sets up the Next.js application, PostgreSQL database, and LocalStack for an S3 simulation:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Start all services (app + PostgreSQL + LocalStack)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` compose`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` up`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# In another terminal, seed the database (first time only)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` compose`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` exec`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` app`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` db:seed`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The application will be available at `,_jsx(_components.a,{href:`http://localhost:3000`,children:`http://localhost:3000`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`services`,children:`Services:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`App:`}),` Running at `,_jsx(_components.a,{href:`http://localhost:3000`,children:`http://localhost:3000`}),` (Environment variable `,_jsx(_components.code,{children:`AWS_S3_EXPERIMENT_BUCKET`}),` is automatically set to `,_jsx(_components.code,{children:`local-bucket`}),`)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`PostgreSQL:`}),` At `,_jsx(_components.code,{children:`localhost:5432`}),` with user `,_jsx(_components.code,{children:`postgres`}),` / password `,_jsx(_components.code,{children:`postgres`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`LocalStack (S3):`}),` Available at `,_jsx(_components.a,{href:`http://localhost:4566`,children:`http://localhost:4566`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`AWS Access Key ID: `,_jsx(_components.code,{children:`test`})]}),`\n`,_jsxs(_components.li,{children:[`AWS Secret Access Key: `,_jsx(_components.code,{children:`test`})]}),`\n`,_jsxs(_components.li,{children:[`Default region: `,_jsx(_components.code,{children:`us-east-1`})]}),`\n`,_jsxs(_components.li,{children:[`S3 bucket data persists in `,_jsx(_components.code,{children:`./s3-bucket/`}),` directory`]}),`\n`,_jsxs(_components.li,{children:[`Default bucket `,_jsx(_components.code,{children:`local-bucket`}),` is automatically created on startup`]}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`interacting-with-localstack-s3-bucket`,children:`Interacting with LocalStack S3 Bucket:`}),`\n`,_jsx(_components.p,{children:`You can interact with the LocalStack S3 bucket using AWS CLI commands via Docker:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# List all buckets`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` compose`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` exec`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` localstack`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` awslocal`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` s3`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ls`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# List contents of the bucket`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` compose`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` exec`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` localstack`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` awslocal`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` s3`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ls`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` s3://local-bucket`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Show file content from the bucket`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` compose`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` exec`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` localstack`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` awslocal`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` s3`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` cp`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` s3://local-bucket/your-file.json`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` -`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Note:`}),` When running everything in Docker Compose, the `,_jsx(_components.code,{children:`DATABASE_URL`}),` uses `,_jsx(_components.code,{children:`db`}),` as the hostname. The connection string is automatically set to: `,_jsx(_components.code,{children:`postgresql://postgres:postgres@db:5432/studio_development`})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`hybrid-setup-database-in-docker-app-locally`,children:`Hybrid Setup (Database in Docker, App Locally)`}),`\n`,_jsx(_components.p,{children:`You can run the database in Docker while running the application locally for faster development:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Start only the database service`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`docker`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` compose`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` up`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` db`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# In another terminal, set up and run the app locally`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`cd`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` inference-studio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create a .env file with DATABASE_URL using localhost (not 'db')`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Example: DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Create prisma client, schema, and populate with sample data`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` db:generate`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` db:push`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` db:seed`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Start development server`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dev`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`security-\u0026-encryption-master_key`,children:`Security \u0026 Encryption (MASTER_KEY)`}),`\n`,_jsxs(_components.p,{children:[`The application uses `,_jsx(_components.code,{children:`MASTER_KEY`}),` to encrypt sensitive API credentials (like Langfuse API keys) stored in the database.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`CRITICAL:`}),` Keep this key secret! Rotating this key will invalidate all encrypted API keys in the database.`]})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Generate a new key:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`node`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -e`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"console.log(require('crypto').randomBytes(32).toString('hex'))\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Must be exactly 64 hexadecimal characters (256 bits).`}),`\n`,_jsx(_components.li,{children:`Must be the same across all application and worker instances.`}),`\n`,_jsxs(_components.li,{children:[`Set it as an environment variable (`,_jsx(_components.code,{children:`MASTER_KEY=your_64_character_hex_string_here`}),`).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`docker-compose.yml`}),` includes a default development key. For production, set `,_jsx(_components.code,{children:`MASTER_KEY`}),` in your environment before running.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Local Setup","description":"How to run the Inference Studio locally for development.","href":"/studio/setup"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Setup Guide","slug":"setup-guide","depth":1,"children":[]},{"title":"Using Docker Compose (Recommended)","slug":"using-docker-compose-recommended","depth":2,"children":[{"title":"Services:","slug":"services","depth":3,"children":[]},{"title":"Interacting with LocalStack S3 Bucket:","slug":"interacting-with-localstack-s3-bucket","depth":3,"children":[]}]},{"title":"Hybrid Setup (Database in Docker, App Locally)","slug":"hybrid-setup-database-in-docker-app-locally","depth":2,"children":[]},{"title":"Security \u0026 Encryption (MASTER_KEY)","slug":"security-\u0026-encryption-master_key","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"neurometricai","siteName":"Neurometric AI","title":"Local Setup - Neurometric AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-12T20:41:07.119Z","originalFileLocation":"studio/setup.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"How to run the Inference Studio locally for development.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Neurometric AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/neurometricai/images/light.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/neurometricai/images/light.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/neurometricai/images/light.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/png\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/neurometricai/images/light.png\">\u003cmeta data-mint-head property=\"og:title\" content=\"Local Setup - Neurometric AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"How to run the Inference Studio locally for development.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Neurometric AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.neurometric.ai/studio/setup\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://neurometricai.mintlify.site/_mintlify/api/og/v2?division=Inference+Studio\u0026amp;title=Local+Setup\u0026amp;description=How+to+run+the+Inference+Studio+locally+for+development.\u0026amp;theme=ad09676d6f1d736da92ae6d6\u0026amp;signature=f829b5a2b06ee04cd47558057d8cb6b846efc1f49f819ccbe6166475c808cca8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Local Setup - Neurometric AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"How to run the Inference Studio locally for development.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://neurometricai.mintlify.site/_mintlify/api/og/v2?division=Inference+Studio\u0026amp;title=Local+Setup\u0026amp;description=How+to+run+the+Inference+Studio+locally+for+development.\u0026amp;theme=ad09676d6f1d736da92ae6d6\u0026amp;signature=f829b5a2b06ee04cd47558057d8cb6b846efc1f49f819ccbe6166475c808cca8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/neurometricai/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Neurometric AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#b8b8b8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.neurometric.ai/studio/setup\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/studio/setup.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.neurometric.ai/#organization\",\"name\":\"Neurometric AI\",\"url\":\"https://docs.neurometric.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/neurometricai/RO81h8yf4_CFu7MN/logo/light.png?fit=max\u0026auto=format\u0026n=RO81h8yf4_CFu7MN\u0026q=85\u0026s=b26ba3de71cd835fecad1d387d119f5b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.neurometric.ai#website\",\"name\":\"Neurometric AI\",\"url\":\"https://docs.neurometric.ai\",\"publisher\":{\"@id\":\"https://docs.neurometric.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.neurometric.ai/studio/setup#webpage\",\"url\":\"https://docs.neurometric.ai/studio/setup\",\"name\":\"Local Setup\",\"description\":\"How to run the Inference Studio locally for development.\",\"dateModified\":\"2026-05-12T20:41:07.119Z\",\"isPartOf\":{\"@id\":\"https://docs.neurometric.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.neurometric.ai/studio/setup#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.neurometric.ai/studio/setup#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inference Studio\",\"item\":\"https://docs.neurometric.ai/studio/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Local Setup\",\"item\":\"https://docs.neurometric.ai/studio/setup\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.neurometric.ai/studio/setup#article\",\"headline\":\"Local Setup\",\"name\":\"Local Setup\",\"description\":\"How to run the Inference Studio locally for development.\",\"url\":\"https://docs.neurometric.ai/studio/setup\",\"mainEntityOfPage\":{\"@id\":\"https://docs.neurometric.ai/studio/setup#webpage\"},\"dateModified\":\"2026-05-12T20:41:07.119Z\",\"publisher\":{\"@id\":\"https://docs.neurometric.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.neurometric.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Neurometric AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Neurometric AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/studio/setup.md","siteName":"Neurometric AI","nav":{"global":{"anchors":[{"anchor":"Documentation","icon":"book-open-cover","href":"https://mintlify.com/docs"},{"anchor":"Blog","icon":"newspaper","href":"https://mintlify.com/blog"}]},"tabs":[{"tab":"Guides","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":""},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Inference Studio","pages":[{"title":"Inference Studio Overview","description":"AI model cost vs performance analysis with interactive scatter plot.","href":"/studio/overview"},{"title":"Local Setup","href":"/studio/setup"},{"title":"Background Jobs","description":"How background jobs work in Inference Studio.","href":"/studio/background-jobs"}]},{"group":"SLM Marketplace","pages":[{"title":"Marketplace Overview","href":"/marketplace/overview"},{"title":"Marketplace Setup","href":"/marketplace/setup"},{"title":"SLM Evaluator","href":"/marketplace/evaluator"}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Local Setup - Neurometric AI","buildId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","deploymentId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","dynamics":[],"chunks":[]}