-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Description
Describe the bug
I build a docker image for myself and everything seems nice. But when i run docker run -d valuecell:0.1.20, here comes the problem:
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
ERROR: Traceback (most recent call last):
File "/app/.venv/lib/python3.12/site-packages/starlette/routing.py", line 701, in lifespan
await receive()
File "/app/.venv/lib/python3.12/site-packages/uvicorn/lifespan/on.py", line 137, in receive
return await self.receive_queue.get()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/queues.py", line 158, in get
await getter
asyncio.exceptions.CancelledError
✓ BaoStock adapter configured
Data adapters configuration completed
But, if run with docker run --it valuecell:0.1.20, works well.
Looks like the program listen STDIN for exit signal???
To Reproduce
The dockerfile which most comes from the official docker/DockerFile with only last CMD line changed:
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
# Install uv.
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
WORKDIR /app
# Pre-cache the application dependencies.
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml /cxcvbnm,rtyuiop[],target=pyproject.toml \
uv sync --locked --no-install-project
# Copy the application into the container.
COPY . /app
# Install the application dependencies.
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked
EXPOSE 8000
# Run the application.
CMD ["uv", "run", "python", "-m", "valuecell.server.main"]
Steps to reproduce the behavior:
- download offical release 0.1.20
- unzip and
cd valuecell-0.1.20/python - create the
dockerfilein current dir - build image by
docker build -t valuecell:0.1.20 . - just run
docker run -d valuecell:0.1.20
Actual behavior
ERROR and exit.
- OS: debian 13
- ValueCell version: 0.1.20
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels