D Ф m i И i q ц e L Ф y e r commited on
Commit ·
ec1c6cb
1
Parent(s): aa4eca6
Fix: Use requirements-light for Render 512MB memory limit
Browse files- .dockerignore +64 -0
- Dockerfile +9 -9
.dockerignore
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Python
|
| 2 |
+
__pycache__/
|
| 3 |
+
*.py[cod]
|
| 4 |
+
*$py.class
|
| 5 |
+
*.so
|
| 6 |
+
.Python
|
| 7 |
+
*.egg-info/
|
| 8 |
+
dist/
|
| 9 |
+
build/
|
| 10 |
+
*.egg
|
| 11 |
+
|
| 12 |
+
# Virtual environments
|
| 13 |
+
venv/
|
| 14 |
+
env/
|
| 15 |
+
.venv/
|
| 16 |
+
test-env/
|
| 17 |
+
|
| 18 |
+
# Environment files
|
| 19 |
+
.env
|
| 20 |
+
.env.local
|
| 21 |
+
.env.*.local
|
| 22 |
+
|
| 23 |
+
# IDE
|
| 24 |
+
.vscode/
|
| 25 |
+
.idea/
|
| 26 |
+
*.swp
|
| 27 |
+
*.swo
|
| 28 |
+
*~
|
| 29 |
+
|
| 30 |
+
# OS
|
| 31 |
+
.DS_Store
|
| 32 |
+
Thumbs.db
|
| 33 |
+
|
| 34 |
+
# Git
|
| 35 |
+
.git/
|
| 36 |
+
.gitignore
|
| 37 |
+
.gitattributes
|
| 38 |
+
|
| 39 |
+
# Documentation
|
| 40 |
+
*.md
|
| 41 |
+
docs/
|
| 42 |
+
|
| 43 |
+
# Tests
|
| 44 |
+
tests/
|
| 45 |
+
.pytest_cache/
|
| 46 |
+
.coverage
|
| 47 |
+
|
| 48 |
+
# Logs
|
| 49 |
+
*.log
|
| 50 |
+
|
| 51 |
+
# Database
|
| 52 |
+
*.db
|
| 53 |
+
*.sqlite
|
| 54 |
+
*.sqlite3
|
| 55 |
+
|
| 56 |
+
# Large files
|
| 57 |
+
*.tar
|
| 58 |
+
*.tar.gz
|
| 59 |
+
*.zip
|
| 60 |
+
|
| 61 |
+
# Temporary files
|
| 62 |
+
tmp/
|
| 63 |
+
temp/
|
| 64 |
+
*.tmp
|
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# SysCRED Docker Configuration for Hugging Face Spaces
|
| 2 |
-
#
|
| 3 |
FROM python:3.10-slim
|
| 4 |
|
| 5 |
WORKDIR /app
|
|
@@ -7,7 +7,7 @@ WORKDIR /app
|
|
| 7 |
ENV PYTHONDONTWRITEBYTECODE=1
|
| 8 |
ENV PYTHONUNBUFFERED=1
|
| 9 |
ENV PYTHONPATH=/app
|
| 10 |
-
ENV SYSCRED_LOAD_ML_MODELS=
|
| 11 |
ENV SYSCRED_ENV=production
|
| 12 |
|
| 13 |
# Install system dependencies
|
|
@@ -15,15 +15,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 15 |
build-essential \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
-
# Copy
|
| 19 |
-
COPY requirements.txt /app/requirements.txt
|
| 20 |
|
| 21 |
-
# Install dependencies (
|
| 22 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
|
| 24 |
-
#
|
| 25 |
-
RUN python -m spacy download en_core_web_md || true
|
| 26 |
-
RUN python -m spacy download fr_core_news_md || true
|
| 27 |
|
| 28 |
# Copy application code
|
| 29 |
COPY syscred/ /app/syscred/
|
|
|
|
| 1 |
# SysCRED Docker Configuration for Hugging Face Spaces
|
| 2 |
+
# LIGHT version (sans ML local) - Optimized for Render 512MB
|
| 3 |
FROM python:3.10-slim
|
| 4 |
|
| 5 |
WORKDIR /app
|
|
|
|
| 7 |
ENV PYTHONDONTWRITEBYTECODE=1
|
| 8 |
ENV PYTHONUNBUFFERED=1
|
| 9 |
ENV PYTHONPATH=/app
|
| 10 |
+
ENV SYSCRED_LOAD_ML_MODELS=false
|
| 11 |
ENV SYSCRED_ENV=production
|
| 12 |
|
| 13 |
# Install system dependencies
|
|
|
|
| 15 |
build-essential \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
+
# Copy LIGHT requirements (sans ML local pour Render 512MB)
|
| 19 |
+
COPY requirements-light.txt /app/requirements-light.txt
|
| 20 |
|
| 21 |
+
# Install dependencies (sans PyTorch, Transformers, spaCy)
|
| 22 |
+
RUN pip install --no-cache-dir -r requirements-light.txt
|
| 23 |
|
| 24 |
+
# NOTE: spaCy models NOT downloaded (requirements-light doesn't include spaCy)
|
| 25 |
+
# RUN python -m spacy download en_core_web_md || true
|
| 26 |
+
# RUN python -m spacy download fr_core_news_md || true
|
| 27 |
|
| 28 |
# Copy application code
|
| 29 |
COPY syscred/ /app/syscred/
|