Spaces:
Running
Running
Claude commited on
Commit ·
2128d4b
1
Parent(s): a68364f
Add Dockerfile and HF Spaces metadata for free deployment
Browse filesProvides a Docker image compatible with the Hugging Face Spaces free
CPU tier: Python 3.11 slim base, ffmpeg + tesseract installed, runs
uvicorn on port 7860 as a non-root user (UID 1000) per HF requirements.
README frontmatter declares the Space metadata so a git push deploys
the app end-to-end.
- .dockerignore +13 -0
- Dockerfile +24 -0
- README.md +28 -0
.dockerignore
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.git
|
| 2 |
+
.gitignore
|
| 3 |
+
__pycache__
|
| 4 |
+
*.pyc
|
| 5 |
+
*.pyo
|
| 6 |
+
.pytest_cache
|
| 7 |
+
.venv
|
| 8 |
+
venv
|
| 9 |
+
*.egg-info
|
| 10 |
+
tests
|
| 11 |
+
smaller.m4v
|
| 12 |
+
M14_L3_S3.srt
|
| 13 |
+
Study Guide_ Introduction to Photosynthesis.html
|
Dockerfile
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 4 |
+
ffmpeg \
|
| 5 |
+
tesseract-ocr \
|
| 6 |
+
libgl1 \
|
| 7 |
+
libglib2.0-0 \
|
| 8 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
+
|
| 10 |
+
RUN useradd -m -u 1000 user
|
| 11 |
+
USER user
|
| 12 |
+
ENV PATH="/home/user/.local/bin:$PATH" \
|
| 13 |
+
HOME=/home/user \
|
| 14 |
+
PYTHONUNBUFFERED=1
|
| 15 |
+
|
| 16 |
+
WORKDIR /home/user/app
|
| 17 |
+
|
| 18 |
+
COPY --chown=user:user requirements.txt .
|
| 19 |
+
RUN pip install --no-cache-dir --user -r requirements.txt
|
| 20 |
+
|
| 21 |
+
COPY --chown=user:user . .
|
| 22 |
+
|
| 23 |
+
EXPOSE 7860
|
| 24 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# VideoGuideMaker
|
| 2 |
|
| 3 |
Generate WCAG 2.2 AA-ready HTML study guides from instructional videos.
|
|
@@ -53,6 +63,24 @@ app/
|
|
| 53 |
tests/
|
| 54 |
```
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
## Status
|
| 57 |
|
| 58 |
MVP. The pipeline runs end-to-end on common inputs. Known gaps:
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: VideoGuideMaker
|
| 3 |
+
emoji: 🎬
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
+
pinned: false
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
# VideoGuideMaker
|
| 12 |
|
| 13 |
Generate WCAG 2.2 AA-ready HTML study guides from instructional videos.
|
|
|
|
| 63 |
tests/
|
| 64 |
```
|
| 65 |
|
| 66 |
+
## Deploy to Hugging Face Spaces
|
| 67 |
+
|
| 68 |
+
This repo ships a Dockerfile compatible with [Hugging Face Spaces](https://huggingface.co/spaces) (free CPU tier).
|
| 69 |
+
|
| 70 |
+
1. Create a new Space at https://huggingface.co/new-space — pick **Docker** as the SDK and **Blank** as the template.
|
| 71 |
+
2. Push this repo to the Space's git remote:
|
| 72 |
+
```bash
|
| 73 |
+
git remote add space https://huggingface.co/spaces/<your-user>/<space-name>
|
| 74 |
+
git push space claude/general-session-a1DDz:main
|
| 75 |
+
```
|
| 76 |
+
(or push whichever branch you want as `main`).
|
| 77 |
+
3. Spaces will read the YAML frontmatter at the top of this README, build the Dockerfile, and expose the app on port `7860`.
|
| 78 |
+
|
| 79 |
+
Notes:
|
| 80 |
+
- Uploads land in `/tmp` inside the container, which is ephemeral — the app is for one-shot processing per visitor.
|
| 81 |
+
- The free CPU tier has plenty of RAM but is not fast; a 20-minute lecture takes a few minutes to process.
|
| 82 |
+
- The Space sleeps after inactivity and wakes on the next request (~30s cold start).
|
| 83 |
+
|
| 84 |
## Status
|
| 85 |
|
| 86 |
MVP. The pipeline runs end-to-end on common inputs. Known gaps:
|