langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
47.8k stars 6.82k forks source link

langgenius/dify-api docker upgrade run error #9272

Closed keven1024 closed 2 hours ago

keven1024 commented 3 hours ago

Self Checks

Dify version

0.91

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I'm upgrading from version 0.5x -> 0.91 When I start docker with default entrypoint, it reports an error log:

/entrypoint.sh: line 32: exec: gunicorn: not found

I tried changing the docker entrypoint to:

/bin/bash -c poetry shell && bash /entrypoint.sh

It still won't start, logs:

Spawning shell within /app/api/.venv
(25, 'Inappropriate ioctl for device')

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 3 hours ago

Hello @keven1024! I'm here to assist you with any bugs, questions, or contributions related to the Dify project. Let's work together to solve this issue!

The error "exec: gunicorn: not found" suggests that gunicorn is not installed in your Docker image. To resolve this, ensure gunicorn is included in your requirements.txt or install it directly in your Dockerfile.

Here's how you can modify your Dockerfile:

FROM python:3.9

# Set working directory
WORKDIR /app

# Copy requirements file
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Ensure gunicorn is installed
RUN pip install gunicorn

# Copy the rest of the application code
COPY . .

# Set the entrypoint
ENTRYPOINT ["./entrypoint.sh"]

After making these changes, rebuild your Docker image. This should resolve the issue with gunicorn not being found [1].

To continue talking to Dosu, mention @dosu.

keven1024 commented 3 hours ago

Hello @keven1024! I'm here to assist you with any bugs, questions, or contributions related to the Dify project. Let's work together to solve this issue!

The error "exec: gunicorn: not found" suggests that gunicorn is not installed in your Docker image. To resolve this, ensure gunicorn is included in your requirements.txt or install it directly in your Dockerfile.

Here's how you can modify your Dockerfile:

FROM python:3.9

# Set working directory
WORKDIR /app

# Copy requirements file
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Ensure gunicorn is installed
RUN pip install gunicorn

# Copy the rest of the application code
COPY . .

# Set the entrypoint
ENTRYPOINT ["./entrypoint.sh"]

After making these changes, rebuild your Docker image. This should resolve the issue with gunicorn not being found [1].

To continue talking to Dosu, mention @dosu.

Do you mean that the official docker doesn't have dependencies like gunicorn?

keven1024 commented 2 hours ago

I found the problem, the path env for 0.91 docker didn't match the 0.5x path, updating it to 0.91 solved it