unit731 commited on
Commit
61773f3
·
verified ·
1 Parent(s): 03839fe

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -9
  2. requirements.txt +2 -13
Dockerfile CHANGED
@@ -1,18 +1,15 @@
1
- # Production Dockerfile for Advanced Cybersecurity AI Platform
2
  FROM python:3.11-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
- git \
10
  curl \
11
- wget \
12
- build-essential \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Clone the repository (HuggingFace Spaces will automatically use the committed files)
16
  COPY . /app
17
 
18
  # Install Python dependencies
@@ -22,12 +19,12 @@ RUN pip install --no-cache-dir -r requirements.txt
22
  # Create necessary directories
23
  RUN mkdir -p /app/data /app/logs /app/temp
24
 
25
- # Set environment variables
26
  ENV PYTHONPATH=/app
27
  ENV PYTHONUNBUFFERED=1
28
- ENV HF_HOME=/app/.huggingface
29
 
30
- # Expose the port that the app runs on
31
  EXPOSE 7860
32
 
33
  # Health check
 
1
+ # HuggingFace Spaces Dockerfile for Cybersecurity AI Platform
2
  FROM python:3.11-slim
3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install only essential system dependencies
8
  RUN apt-get update && apt-get install -y \
 
9
  curl \
 
 
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Copy application files
13
  COPY . /app
14
 
15
  # Install Python dependencies
 
19
  # Create necessary directories
20
  RUN mkdir -p /app/data /app/logs /app/temp
21
 
22
+ # Set environment variables for HuggingFace Spaces
23
  ENV PYTHONPATH=/app
24
  ENV PYTHONUNBUFFERED=1
25
+ ENV PORT=7860
26
 
27
+ # Expose the HuggingFace Spaces port
28
  EXPOSE 7860
29
 
30
  # Health check
requirements.txt CHANGED
@@ -1,4 +1,4 @@
1
- # Production requirements for HuggingFace Spaces deployment
2
  fastapi==0.104.1
3
  uvicorn[standard]==0.24.0
4
  pydantic==2.5.0
@@ -6,20 +6,9 @@ python-multipart==0.0.6
6
  httpx==0.25.2
7
  requests==2.31.0
8
  jinja2==3.1.2
9
- python-jose[cryptography]==3.3.0
10
- passlib[bcrypt]==1.7.4
11
  aiofiles==23.2.1
12
 
13
- # Lightweight ML dependencies (no torch to reduce size)
14
- huggingface_hub==0.19.4
15
- tokenizers==0.15.0
16
-
17
- # Cybersecurity libraries
18
- python-nmap==0.7.1
19
- scapy==2.5.0
20
  dnspython==2.4.2
21
  cryptography==41.0.7
22
-
23
- # Monitoring and logging
24
  psutil==5.9.6
25
- prometheus-client==0.19.0
 
1
+ # Lightweight requirements for HuggingFace Spaces deployment
2
  fastapi==0.104.1
3
  uvicorn[standard]==0.24.0
4
  pydantic==2.5.0
 
6
  httpx==0.25.2
7
  requests==2.31.0
8
  jinja2==3.1.2
 
 
9
  aiofiles==23.2.1
10
 
11
+ # Basic utilities (removing problematic networking libraries)
 
 
 
 
 
 
12
  dnspython==2.4.2
13
  cryptography==41.0.7
 
 
14
  psutil==5.9.6