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
46.01k stars 6.48k forks source link

Offline deployment in the intranet environment (configuration agent can access gpt) using openai gpt-4 Q&A background error reporting。Error:ERROR:root:HTTPSConnectionPool(host='openaipublic.blob.core.windows.net' #3635

Closed smart-aiops closed 5 months ago

smart-aiops commented 5 months ago

Self Checks

Dify version

0.6.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image image

2881aac962236b162f15579141c63cb9_61220

✔️ Expected Behavior

image image

2881aac962236b162f15579141c63cb9_61220

❌ Actual Behavior

image image

2881aac962236b162f15579141c63cb9_61220

dosubot[bot] commented 5 months ago

To address the FileNotFoundError in your self-hosted Docker setup when attempting offline deployment with access to GPT-4, follow these targeted steps:

  1. Ensure Correct Docker Volume Mappings: Double-check your docker-compose.yml for accurate volume mappings to make necessary files accessible inside the Docker container.

  2. Verify Configuration File Paths: Confirm that paths referenced in your application, such as those in manage.py, are correct and accessible within the Docker environment.

  3. Check for Required Files: Make sure all files needed by your application are present and correctly referenced, including any external configuration files for GPT-4 access.

  4. Configure GPT-4 Access Properly: Ensure that configuration for GPT-4 access, including API keys and endpoint URLs, is correctly set up within your Docker environment.

  5. Utilize Debugging and Logs: Use Docker and application logs to identify the specific file or configuration causing the issue. Running the container with increased verbosity can provide additional insights.

  6. Review File Permissions: Confirm the Docker container has the necessary permissions to access the file in question.

  7. Audit Configuration Variables: Review all environment variables and settings, ensuring they are correctly configured for your intranet environment, especially those related to file storage and database access.

  8. Ensure Database and Redis Accessibility: Verify that your database and Redis instances are correctly set up and accessible by the Docker container.

For detailed guidance, refer to the Dify documentation on self-hosted installation and environment configuration. This includes checking the Dify Self-Hosted Installation Guide and the Environment Variables section for specific settings related to your setup.

Sources

#### About Dosu This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
crazywoola commented 5 months ago

Can not resolve openaipublic.blob.core.windows.net typical means it's a general network issue. Please use a proper proxy to deal with such kind of issues.

smart-aiops commented 4 months ago

resolve https://github.com/langgenius/dify/issues/1014

Reason: In an offline environment, TikToken and Jieba need internet access to obtain the segmentation files, leading to connection failure.

Solution: In an environment with internet access, successfully execute the knowledge base indexing once. This will generate data-gym-cache and jieba.cache in the /tmp directory of the worker_1 docker container. Copy the /tmp folder to the offline docker containers (docker_worker_1 and docker_api_1) to resolve the issue.