Skip to content

[Feature Request]: The downloaded model can be saved in a fixed location to avoid re-downloading each time Docker is restarted. #3291

Closed
@biofer

Description

@biofer

Is there an existing issue for the same feature request?

  • I have checked the existing issues.

Is your feature request related to a problem?

No response

Describe the feature you'd like

The downloaded model can be saved in a fixed location to avoid re-downloading each time Docker is restarted.

And the following models will be downloaded if you select them in the RAGFlow UI.
- BAAI/bge-base-en-v1.5
- BAAI/bge-large-en-v1.5
- BAAI/bge-small-en-v1.5
- BAAI/bge-small-zh-v1.5
- jinaai/jina-embeddings-v2-base-en
- jinaai/jina-embeddings-v2-small-en
- nomic-ai/nomic-embed-text-v1.5
- sentence-transformers/all-MiniLM-L6-v2

Describe implementation you've considered

No response

Documentation, adoption, use case

No response

Additional information

No response

Activity

yuzhichang

yuzhichang commented on Nov 9, 2024

@yuzhichang
Member

Not container restart but recreation redownload models.
To avoid redownload, you can change docker-compose.yml to mount a host directory into ragflow container's /root/.ragflow directory.

biofer

biofer commented on Nov 11, 2024

@biofer
Author

As per the previous response, I have modified the docker-compose.yml file to map the host directory to the container's /root/.ragflow directory to avoid re-downloading models on container restart. My updated configuration is as follows:

volumes:
  - ./service_conf.yaml:/ragflow/conf/service_conf.yaml
  - ./ragflow-logs:/ragflow/logs
  - ./nginx/ragflow.conf:/etc/nginx/conf.d/ragflow.conf
  - ./nginx/proxy.conf:/etc/nginx/proxy.conf
  - ./nginx/nginx.conf:/etc/nginx/nginx.conf
  - ../model:/root/.ragflow
image After starting the container, the model files are successfully created inside the container in the `/root/.ragflow` directory. However, the corresponding host directory `../model` remains empty. So, how can I map the files successfully?@yuzhichang image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @yuzhichang@biofer

      Issue actions

        [Feature Request]: The downloaded model can be saved in a fixed location to avoid re-downloading each time Docker is restarted. · Issue #3291 · infiniflow/ragflow