asmitha commited on
Commit
f4f1dbe
·
1 Parent(s): fed039b

Add Hugging Face Space deployment support

Browse files
Files changed (3) hide show
  1. .dockerignore +12 -0
  2. Dockerfile +18 -0
  3. README.md +11 -0
.dockerignore ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .git
2
+ .github
3
+ .venv
4
+ .local
5
+ .pytest_cache
6
+ __pycache__
7
+ *.pyc
8
+ data
9
+ masterman
10
+ htmlcov
11
+ .coverage
12
+ README_HF_DRAFT.md
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV PYTHONUNBUFFERED=1
4
+ ENV PYTHONDONTWRITEBYTECODE=1
5
+ ENV SUBSCRIPTION_PIPELINE_ENGINE=pandas
6
+
7
+ WORKDIR /app
8
+
9
+ COPY requirements.txt .
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ COPY . .
13
+
14
+ RUN python run_pipeline.py --records 50000 --skip-benchmark
15
+
16
+ EXPOSE 7860
17
+
18
+ CMD ["python", "-m", "uvicorn", "src.web.app:app", "--host", "0.0.0.0", "--port", "7860"]
README.md CHANGED
@@ -151,6 +151,17 @@ python run_dashboard.py
151
  The launcher starts a FastAPI server on the first available local port from
152
  `8000` onward.
153
 
 
 
 
 
 
 
 
 
 
 
 
154
  ### Tests
155
 
156
  ```bash
 
151
  The launcher starts a FastAPI server on the first available local port from
152
  `8000` onward.
153
 
154
+ ### Hugging Face Space / Docker
155
+
156
+ The repository includes a Dockerfile for Hugging Face Spaces. The container
157
+ build generates a 50K-record demo dataset and serves the dashboard on port
158
+ `7860`.
159
+
160
+ ```bash
161
+ docker build -t subscription-intelligence-pipeline .
162
+ docker run -p 7860:7860 subscription-intelligence-pipeline
163
+ ```
164
+
165
  ### Tests
166
 
167
  ```bash