langgenius/dify-api docker upgrade run error #6054

Closed
opened 2026-02-21 18:13:51 -05:00 by yindo · 3 comments
Owner

Originally created by @keven1024 on GitHub (Oct 12, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

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

Originally created by @keven1024 on GitHub (Oct 12, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### 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: ```bash /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_
yindo added the 🐞 bug label 2026-02-21 18:13:51 -05:00
yindo closed this issue 2026-02-21 18:13:51 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Oct 12, 2024):

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.

@dosubot[bot] commented on GitHub (Oct 12, 2024): <!-- Greeting --> 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! <!-- Answer --> 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: ```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 <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/docker/entrypoint.sh)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@keven1024 commented on GitHub (Oct 12, 2024):

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 on GitHub (Oct 12, 2024): > 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: > > ```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]](https://github.com/langgenius/dify/blob/main/api/docker/entrypoint.sh). > > _To continue talking to [Dosu](https://dosu.dev), mention @dosu._ Do you mean that the official docker doesn't have dependencies like gunicorn?
Author
Owner

@keven1024 commented on GitHub (Oct 12, 2024):

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

@keven1024 commented on GitHub (Oct 12, 2024): 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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6054