llama-stack-mirror/llama_stack
Rohan Awhad d797f9aec1
fix: #2495 FileNotFound Err in container image (#2498)
# What does this PR do?

Closes #2495 

Changes:
- Delay the `COPY run.yaml` into docker image step until after external
provider handling
- Split the check for `external_providers_dir` into “non-empty” and
“directory exists"


## Test Plan

0. Create and Activate venv

1. Create a `simple_build.yaml`
    ```yaml
    version: '2'
    distribution_spec:
      providers:
        inference:
          - remote::openai
    image_type: container
    image_name: openai-stack
    ```

2. Run llama stack build:
```bash
llama stack build --config simple_build.yaml
```

3. Run the docker container:
```bash
docker run \
  -p 8321:8321 \
  -e OPENAI_API_KEY=$OPENAI_API_KEY \
  openai_stack:0.2.12
```

This should show server is running.
```
INFO     2025-06-23 19:07:57,832 llama_stack.distribution.distribution:151 core: Loading external providers from /.llama/providers.d
INFO     2025-06-23 19:07:59,324 __main__:572 server: Listening on ['::', '0.0.0.0']:8321
INFO:     Started server process [1]
INFO:     Waiting for application startup.
INFO     2025-06-23 19:07:59,336 __main__:156 server: Starting up
INFO:     Application startup complete.                                                                             
INFO:     Uvicorn running on http://['::', '0.0.0.0']:8321 (Press CTRL+C to quit)
```

Notice the first line:
```
Loading external providers from /.llama/providers.d
```
This is expected behaviour.

Co-authored-by: Rohan Awhad <rawhad@redhat.com>
2025-06-24 09:08:08 +05:30
..
apis feat: remove score_threshold constraint (#2479) 2025-06-20 09:17:42 +05:30
cli fix: stack build (#2485) 2025-06-20 15:15:43 -07:00
distribution fix: #2495 FileNotFound Err in container image (#2498) 2025-06-24 09:08:08 +05:30
models ci: add python package build test (#2457) 2025-06-19 18:57:32 +05:30
providers feat: support auth attributes in inference/responses stores (#2389) 2025-06-20 10:24:45 -07:00
strong_typing chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
templates feat: expand set of known gemini models (#2471) 2025-06-19 12:19:37 -04:00
ui build: Bump version to 0.2.12 2025-06-20 21:06:17 +00:00
__init__.py export LibraryClient 2024-12-13 12:08:00 -08:00
env.py refactor(test): move tools, evals, datasetio, scoring and post training tests (#1401) 2025-03-04 14:53:47 -08:00
log.py ci: fix external provider test (#2438) 2025-06-12 16:14:32 +02:00
schema_utils.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00