gcharanteja commited on
Commit
2c0e3f2
·
1 Parent(s): c560e69

Add HF Spaces Docker deployment

Browse files
Files changed (6) hide show
  1. .python-version +1 -0
  2. Dockerfile +25 -0
  3. README.md +7 -5
  4. main.py +13 -0
  5. pyproject.toml +9 -0
  6. uv.lock +35 -0
.python-version ADDED
@@ -0,0 +1 @@
 
 
1
+ 3.13
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.12-slim
2
+
3
+ # Install dependencies
4
+ RUN apt-get update && apt-get install -y wget curl && \
5
+ rm -rf /var/lib/apt/lists/*
6
+
7
+ # Install uv
8
+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
9
+
10
+ # Create a non-root user matching HF Spaces expectations
11
+ RUN useradd -m -u 1000 user
12
+ USER user
13
+
14
+ ENV HOME=/home/user
15
+ WORKDIR $HOME/app
16
+
17
+ # Copy project files
18
+ COPY --chown=user pyproject.toml uv.lock* ./
19
+ RUN uv sync --frozen --no-dev
20
+
21
+ # Copy application files
22
+ COPY --chown=user . .
23
+
24
+ # Run main.py
25
+ CMD ["uv", "run", "main.py"]
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
  title: Mann
3
- emoji: 🦀
4
- colorFrom: purple
5
- colorTo: yellow
6
  sdk: docker
7
- pinned: false
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
1
  ---
2
  title: Mann
 
 
 
3
  sdk: docker
 
4
  ---
5
 
6
+ # Mann - Terminal Loading Animation
7
+
8
+ Infinite loading animation using tqdm, visible in Hugging Face Spaces logs.
9
+
10
+ ## Deployment
11
+
12
+ This space uses Docker. The loading animation runs continuously and can be viewed in the Space logs.
main.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import time
2
+ from tqdm import tqdm
3
+
4
+ def main():
5
+ # Infinite loading animation
6
+ try:
7
+ for i in tqdm(range(1000000), desc="Loading NINININININININ", unit="%", bar_format="{l_bar}{bar}| {n_fmt}/{total_fmt}"):
8
+ time.sleep(0.01)
9
+ except KeyboardInterrupt:
10
+ print("\nLoading interrupted!")
11
+
12
+ if __name__ == "__main__":
13
+ main()
pyproject.toml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ [project]
2
+ name = "mann"
3
+ version = "0.1.0"
4
+ description = "Add your description here"
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ dependencies = [
8
+ "tqdm>=4.67.3",
9
+ ]
uv.lock ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version = 1
2
+ revision = 3
3
+ requires-python = ">=3.13"
4
+
5
+ [[package]]
6
+ name = "colorama"
7
+ version = "0.4.6"
8
+ source = { registry = "https://pypi.org/simple" }
9
+ sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
10
+ wheels = [
11
+ { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
12
+ ]
13
+
14
+ [[package]]
15
+ name = "mann"
16
+ version = "0.1.0"
17
+ source = { virtual = "." }
18
+ dependencies = [
19
+ { name = "tqdm" },
20
+ ]
21
+
22
+ [package.metadata]
23
+ requires-dist = [{ name = "tqdm", specifier = ">=4.67.3" }]
24
+
25
+ [[package]]
26
+ name = "tqdm"
27
+ version = "4.67.3"
28
+ source = { registry = "https://pypi.org/simple" }
29
+ dependencies = [
30
+ { name = "colorama", marker = "sys_platform == 'win32'" },
31
+ ]
32
+ sdist = { url = "https://files.pythonhosted.org/packages/09/a9/6ba95a270c6f1fbcd8dac228323f2777d886cb206987444e4bce66338dd4/tqdm-4.67.3.tar.gz", hash = "sha256:7d825f03f89244ef73f1d4ce193cb1774a8179fd96f31d7e1dcde62092b960bb", size = 169598, upload-time = "2026-02-03T17:35:53.048Z" }
33
+ wheels = [
34
+ { url = "https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl", hash = "sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf", size = 78374, upload-time = "2026-02-03T17:35:50.982Z" },
35
+ ]