yangdx commited on
Commit
2d249a9
·
1 Parent(s): 18b2f01

Remove separate requirements.txt and update Dockerfile to use pip install

Browse files
Files changed (3) hide show
  1. Dockerfile +6 -5
  2. lightrag/api/requirements.txt +0 -23
  3. requirements.txt +0 -22
Dockerfile CHANGED
@@ -12,14 +12,15 @@ RUN apt-get update && apt-get install -y \
12
  && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
13
  && . $HOME/.cargo/env
14
 
15
- # Copy only requirements files first to leverage Docker cache
16
- COPY requirements.txt .
17
- COPY lightrag/api/requirements.txt ./lightrag/api/
 
18
 
19
  # Install dependencies
20
  ENV PATH="/root/.cargo/bin:${PATH}"
21
- RUN pip install --user --no-cache-dir -r requirements.txt
22
- RUN pip install --user --no-cache-dir -r lightrag/api/requirements.txt
23
 
24
  # Install depndencies for default storage
25
  RUN pip install --user --no-cache-dir nano-vectordb networkx
 
12
  && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
13
  && . $HOME/.cargo/env
14
 
15
+ # Copy pyproject.toml and source code for dependency installation
16
+ COPY pyproject.toml .
17
+ COPY setup.py .
18
+ COPY lightrag/ ./lightrag/
19
 
20
  # Install dependencies
21
  ENV PATH="/root/.cargo/bin:${PATH}"
22
+ RUN pip install --user --no-cache-dir .
23
+ RUN pip install --user --no-cache-dir .[api]
24
 
25
  # Install depndencies for default storage
26
  RUN pip install --user --no-cache-dir nano-vectordb networkx
lightrag/api/requirements.txt DELETED
@@ -1,23 +0,0 @@
1
- aiofiles
2
- ascii_colors
3
- asyncpg
4
- distro
5
- dotenv
6
- fastapi
7
- httpcore
8
- httpx
9
- jiter
10
- numpy
11
- openai
12
- passlib[bcrypt]
13
- pipmaster
14
- pydantic
15
- PyJWT
16
- python-dotenv
17
- python-jose[cryptography]
18
- python-multipart
19
- pytz
20
- pyuca
21
- tenacity
22
- tiktoken
23
- uvicorn
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
requirements.txt DELETED
@@ -1,22 +0,0 @@
1
- aiohttp
2
- configparser
3
- future
4
-
5
- # Additional Packages for export Functionality
6
- pandas>=2.0.0
7
-
8
- # Extra libraries are installed when needed using pipmaster
9
-
10
- pipmaster
11
- pydantic
12
- python-dotenv
13
-
14
- # Unicode Collation Algorithm for proper Chinese sorting
15
- pyuca
16
-
17
- setuptools
18
- tenacity
19
-
20
- # LLM packages
21
- tiktoken
22
- xlsxwriter>=3.1.0