mansh commited on
Commit
60d9072
·
1 Parent(s): 9f3334a

Add HuggingFace Spaces deployment config

Browse files

Dockerfile for Docker SDK deployment on HF Spaces (port 7860),
.dockerignore to keep image small, and README with Spaces metadata.

Files changed (3) hide show
  1. .dockerignore +14 -0
  2. Dockerfile +23 -0
  3. README.md +12 -0
.dockerignore ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ frontend/
2
+ .git/
3
+ .env
4
+ __pycache__/
5
+ *.pyc
6
+ venv/
7
+ .venv/
8
+ data/
9
+ evaluation/
10
+ .claude/
11
+ node_modules/
12
+ .next/
13
+ *.md
14
+ !README.md
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y --no-install-recommends \
7
+ build-essential \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Install CPU-only PyTorch first (smaller footprint)
11
+ RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
12
+
13
+ # Copy requirements and install
14
+ COPY requirements-deploy.txt .
15
+ RUN pip install --no-cache-dir -r requirements-deploy.txt
16
+
17
+ # Copy application code
18
+ COPY . .
19
+
20
+ # HuggingFace Spaces expects port 7860
21
+ EXPOSE 7860
22
+
23
+ CMD ["uvicorn", "backend.app:app", "--host", "0.0.0.0", "--port", "7860"]
README.md ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: HuggingFace Course RAG API
3
+ emoji: 🤗
4
+ colorFrom: yellow
5
+ colorTo: purple
6
+ sdk: docker
7
+ app_port: 7860
8
+ ---
9
+
10
+ # HuggingFace Course RAG - Backend API
11
+
12
+ Multimodal RAG system over HuggingFace Learn courses.