You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

upgrade_ragflow.mdx 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. ---
  2. sidebar_position: 11
  3. slug: /upgrade_ragflow
  4. ---
  5. # Upgrading
  6. import Tabs from '@theme/Tabs';
  7. import TabItem from '@theme/TabItem';
  8. Upgrade RAGFlow to `nightly-slim`/`nightly` or the latest, published release.
  9. :::info NOTE
  10. Upgrading RAGFlow in itself will *not* remove your uploaded/historical data. However, be aware that `docker compose -f docker/docker-compose.yml down -v` will remove Docker container volumes, resulting in data loss.
  11. :::
  12. ## Upgrade RAGFlow to `nightly-slim`/`nightly`, the most recent, tested Docker image
  13. `nightly-slim` refers to the RAGFlow Docker image *without* embedding models, while `nightly` refers to the RAGFlow Docker image with embedding models. For details on their differences, see [ragflow/docker/.env](https://github.com/infiniflow/ragflow/blob/main/docker/.env).
  14. To upgrade RAGFlow, you must upgrade **both** your code **and** your Docker image:
  15. 1. Clone the repo
  16. ```bash
  17. git clone https://github.com/infiniflow/ragflow.git
  18. ```
  19. 2. Update **ragflow/docker/.env**:
  20. <Tabs
  21. defaultValue="nightly-slim"
  22. values={[
  23. {label: 'nightly-slim', value: 'nightly-slim'},
  24. {label: 'nightly', value: 'nightly'},
  25. ]}>
  26. <TabItem value="nightly-slim">
  27. ```bash
  28. RAGFLOW_IMAGE=infiniflow/ragflow:nightly-slim
  29. ```
  30. </TabItem>
  31. <TabItem value="nightly">
  32. ```bash
  33. RAGFLOW_IMAGE=infiniflow/ragflow:nightly
  34. ```
  35. </TabItem>
  36. </Tabs>
  37. 3. Update RAGFlow image and restart RAGFlow:
  38. ```bash
  39. docker compose -f docker/docker-compose.yml pull
  40. docker compose -f docker/docker-compose.yml up -d
  41. ```
  42. ## Upgrade RAGFlow to the most recent, officially published release
  43. To upgrade RAGFlow, you must upgrade **both** your code **and** your Docker image:
  44. 1. Clone the repo
  45. ```bash
  46. git clone https://github.com/infiniflow/ragflow.git
  47. ```
  48. 2. Switch to the latest, officially published release, e.g., `v0.20.1`:
  49. ```bash
  50. git checkout -f v0.20.1
  51. ```
  52. 3. Update **ragflow/docker/.env**:
  53. <Tabs
  54. defaultValue="slim"
  55. values={[
  56. {label: 'slim', value: 'slim'},
  57. {label: 'full', value: 'full'},
  58. ]}>
  59. <TabItem value="slim">
  60. ```bash
  61. RAGFLOW_IMAGE=infiniflow/ragflow:v0.20.1-slim
  62. ```
  63. </TabItem>
  64. <TabItem value="full">
  65. ```bash
  66. RAGFLOW_IMAGE=infiniflow/ragflow:v0.20.1
  67. ```
  68. </TabItem>
  69. </Tabs>
  70. 4. Update the RAGFlow image and restart RAGFlow:
  71. ```bash
  72. docker compose -f docker/docker-compose.yml pull
  73. docker compose -f docker/docker-compose.yml up -d
  74. ```
  75. ## Frequently asked questions
  76. ### Do I need to back up my knowledge bases before upgrading RAGFlow?
  77. No, you do not need to. Upgrading RAGFlow in itself will *not* remove your uploaded data or knowledge base settings. However, be aware that `docker compose -f docker/docker-compose.yml down -v` will remove Docker container volumes, resulting in data loss.
  78. ### Upgrade RAGFlow in an offline environment (without Internet access)
  79. 1. From an environment with Internet access, pull the required Docker image.
  80. 2. Save the Docker image to a **.tar** file.
  81. ```bash
  82. docker save -o ragflow.v0.20.1.tar infiniflow/ragflow:v0.20.1
  83. ```
  84. 3. Copy the **.tar** file to the target server.
  85. 4. Load the **.tar** file into Docker:
  86. ```bash
  87. docker load -i ragflow.v0.20.1.tar
  88. ```