SShortSingh.
Back to feed

Run AI Models Locally Using Docker Model Runner and Spring AI

0
·1 views

Developers building Java applications with Spring AI can run large language models locally using Docker Model Runner, eliminating the need for cloud-hosted AI services like OpenAI or AWS Bedrock. Docker Model Runner exposes an OpenAI-compatible API endpoint, allowing Spring Boot applications to communicate with local models through standard Spring AI abstractions such as ChatClient and ChatModel. Running models locally helps developers avoid API costs during experimentation, keep sensitive data on-device, and work without an active internet connection. The setup requires Docker Desktop and the Spring AI OpenAI starter dependency, which connects to the local runtime rather than OpenAI's cloud infrastructure. This approach lets developers test prompts, RAG pipelines, and tool-calling logic without configuring cloud credentials each time.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

14-Year-Old Indian Developer Ships 3 Web Projects Using Only a Budget Smartphone

Adrish, a 14-year-old developer from India, has built and deployed three web projects without access to a laptop or PC. His entire development setup runs on a Samsung M11 using free mobile code editors TrebEdit and Cxxdroid. His completed projects include a personal portfolio, a calculator, and a password generator, all hosted on Cloudflare. The calculator and password generator were collaborative efforts, with Adrish handling HTML and CSS while a friend contributed the JavaScript. He works with Vanilla HTML, Vanilla CSS, C, QB64, and is a beginner in Python.

0
ProgrammingHacker News ·

Satirical piece questions what 'neurotypical' really means in society

A satirical article published on erikengdahl.se flips the conventional framing around neurodivergence by presenting neurotypicality as the condition worth scrutinizing. The piece estimates that up to 9,625 out of every 10,000 people may be neurotypical, playing on the language typically used to describe autism prevalence. It uses dry humor to challenge assumptions about what constitutes a 'normal' brain. The article gained modest traction on Hacker News, attracting a small number of comments and upvotes. Its central point appears to be a critique of how society defines and values neurological difference.

0
ProgrammingDEV Community ·

Silent workflow bug reported 'success' 27 times daily while skipping all real work

A developer discovered that 27 workflow branches were being silently skipped every day, yet each run was marked as COMPLETED with no warnings. The root cause was an enum value, StepExecutionStatus.SKIPPED, that had existed in the codebase since the project's start but had never actually been written to the database. Skipped steps left no database rows, making them invisible in the UI and impossible to query without manually parsing a JSON blob. The fix involved writing real database rows for skipped steps and adding run-level counts for processed, skipped, and failed steps. The incident highlighted a broader problem: health checks and status indicators can appear green while the system silently does nothing meaningful.

0
ProgrammingDEV Community ·

Testcontainers Guide: Run Real Docker Dependencies in Automated Tests

Testcontainers is a multi-language library that programmatically starts and stops real Docker containers during automated test runs, supporting .NET, Java, Go, Python, Node.js, and more. It solves key problems with older approaches like docker-compose setups, where container lifecycles were decoupled from test execution and stale data or unready services caused flaky tests. The library provides genuine readiness detection to confirm a service is truly accepting connections, not just that its process has started, eliminating race-condition failures. It also handles dynamic port allocation, automatic cleanup via a Ryuk-based safety net, and supports a broad module ecosystem well beyond databases. Performance features like container reuse help make Testcontainers practical for routine use rather than an occasional, costly testing option.