DeWitt Gibson commited on
Commit
8bc88a1
·
1 Parent(s): 0cabdfb

Updating requirements

Browse files
Files changed (4) hide show
  1. REQUIREMENTS.md +68 -0
  2. docker/dockerfile +2 -2
  3. requirements-full.txt +21 -0
  4. requirements.txt +13 -5
REQUIREMENTS.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LLMGuardian Requirements Files
2
+
3
+ This directory contains various requirements files for different use cases.
4
+
5
+ ## Files
6
+
7
+ ### For Development & Production
8
+
9
+ - **`requirements-full.txt`** - Complete requirements for local development
10
+ - Use this for development: `pip install -r requirements-full.txt`
11
+ - Includes all dependencies via `-r requirements/base.txt`
12
+
13
+ - **`requirements/base.txt`** - Core dependencies
14
+ - **`requirements/dev.txt`** - Development tools
15
+ - **`requirements/test.txt`** - Testing dependencies
16
+ - **`requirements/dashboard.txt`** - Dashboard dependencies
17
+ - **`requirements/prod.txt`** - Production dependencies
18
+
19
+ ### For Deployment
20
+
21
+ - **`requirements.txt`** (root) - Minimal requirements for HuggingFace Space
22
+ - Nearly empty - HuggingFace provides Gradio automatically
23
+ - Used only for the demo Space deployment
24
+
25
+ - **`requirements-space.txt`** - Alternative minimal requirements
26
+ - **`requirements-hf.txt`** - Another lightweight option
27
+
28
+ ## Installation Guide
29
+
30
+ ### Local Development (Full Features)
31
+
32
+ ```bash
33
+ # Clone the repository
34
+ git clone https://github.com/dewitt4/LLMGuardian.git
35
+ cd LLMGuardian
36
+
37
+ # Install with all dependencies
38
+ pip install -r requirements-full.txt
39
+
40
+ # Or install as editable package
41
+ pip install -e ".[dev,test]"
42
+ ```
43
+
44
+ ### HuggingFace Space (Demo)
45
+
46
+ The `requirements.txt` in the root is intentionally minimal for the HuggingFace Space demo, which only needs Gradio (provided by HuggingFace).
47
+
48
+ ### Docker Deployment
49
+
50
+ The Dockerfile uses `requirements-full.txt` for complete functionality.
51
+
52
+ ## Why Multiple Files?
53
+
54
+ 1. **Separation of Concerns**: Different environments need different dependencies
55
+ 2. **HuggingFace Compatibility**: HuggingFace Spaces can't handle `-r` references to subdirectories
56
+ 3. **Minimal Demo**: The HuggingFace Space is a lightweight demo, not full installation
57
+ 4. **Development Flexibility**: Developers can install only what they need
58
+
59
+ ## Quick Reference
60
+
61
+ | Use Case | Command |
62
+ |----------|---------|
63
+ | Full local development | `pip install -r requirements-full.txt` |
64
+ | Package installation | `pip install -e .` |
65
+ | Development with extras | `pip install -e ".[dev,test]"` |
66
+ | Dashboard only | `pip install -e ".[dashboard]"` |
67
+ | HuggingFace Space | Automatic (uses `requirements.txt`) |
68
+ | Docker | Handled by Dockerfile |
docker/dockerfile CHANGED
@@ -18,11 +18,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
18
 
19
  # Copy requirements files
20
  COPY requirements/ /app/requirements/
21
- COPY requirements.txt /app/
22
 
23
  # Install Python dependencies
24
  RUN pip install --upgrade pip && \
25
- pip install -r requirements.txt
26
 
27
  # Copy source code
28
  COPY src/ /app/src/
 
18
 
19
  # Copy requirements files
20
  COPY requirements/ /app/requirements/
21
+ COPY requirements-full.txt /app/
22
 
23
  # Install Python dependencies
24
  RUN pip install --upgrade pip && \
25
+ pip install -r requirements-full.txt
26
 
27
  # Copy source code
28
  COPY src/ /app/src/
requirements-full.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Root requirements.txt
2
+ -r requirements/base.txt
3
+
4
+ # CLI Dependencies
5
+ click>=8.1.0
6
+ rich>=13.0.0
7
+
8
+ # Dashboard Dependencies
9
+ streamlit>=1.28.0
10
+ plotly>=5.17.0
11
+
12
+ # Development Dependencies
13
+ pytest>=7.0.0
14
+ pytest-cov>=4.0.0
15
+ black>=23.0.0
16
+ flake8>=6.0.0
17
+
18
+ # API Dependencies
19
+ fastapi>=0.70.0
20
+ uvicorn>=0.15.0
21
+ gradio>=3.0.0
requirements.txt CHANGED
@@ -1,11 +1,19 @@
1
- # Root requirements.txt
2
- -r requirements/base.txt
 
 
 
 
 
 
 
3
 
4
- # CLI Dependencies
5
- click>=8.1.0
6
  rich>=13.0.0
7
 
8
- # Dashboard Dependencies
 
 
 
9
  streamlit>=1.28.0
10
  plotly>=5.17.0
11
 
 
1
+ # LLMGuardian - Minimal Requirements for HuggingFace Space# Root requirements.txt
2
+
3
+ # For full installation, see requirements-full.txt and requirements/base.txt-r requirements/base.txt
4
+
5
+
6
+
7
+ # Note: Gradio and uvicorn are installed by HuggingFace automatically# CLI Dependencies
8
+
9
+ # This file only needs to list additional dependenciesclick>=8.1.0
10
 
 
 
11
  rich>=13.0.0
12
 
13
+ # No additional dependencies needed for the demo Space
14
+
15
+ # The app.py is standalone and only requires Gradio# Dashboard Dependencies
16
+
17
  streamlit>=1.28.0
18
  plotly>=5.17.0
19