Spaces:
Sleeping
Sleeping
NagaNithin-V commited on
Commit ·
ffe45d8
1
Parent(s): 8c2ed14
Switch to Gradio demo — load trained LoRA or base model
Browse files- Dockerfile +19 -14
Dockerfile
CHANGED
|
@@ -1,27 +1,32 @@
|
|
| 1 |
-
# Hugging Face Space Dockerfile.
|
| 2 |
-
# Mirrors the root Dockerfile, exists separately because HF Spaces looks for
|
| 3 |
-
# the Dockerfile inside the Space root by default.
|
| 4 |
-
|
| 5 |
FROM python:3.11-slim
|
| 6 |
|
| 7 |
WORKDIR /app
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
RUN pip install --no-cache-dir \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
"pydantic>=2.6" \
|
| 16 |
-
"
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
ENV PYTHONUNBUFFERED=1
|
| 23 |
ENV PYTHONPATH=/app
|
| 24 |
|
| 25 |
EXPOSE 7860
|
| 26 |
|
| 27 |
-
CMD ["
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
RUN apt-get update -qq && apt-get install -y -qq git && rm -rf /var/lib/apt/lists/*
|
| 6 |
+
|
| 7 |
+
# Clone repo (includes env, graphforge, training, pyproject.toml)
|
| 8 |
+
RUN git clone --depth 1 https://github.com/nithin062006/scaler.git .
|
| 9 |
|
| 10 |
+
# CPU-only torch (keeps image small; no GPU needed for 0.5B demo)
|
| 11 |
+
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
|
| 12 |
+
|
| 13 |
+
# ML stack + Gradio
|
| 14 |
RUN pip install --no-cache-dir \
|
| 15 |
+
"transformers>=4.40" \
|
| 16 |
+
"peft>=0.10" \
|
| 17 |
+
"huggingface_hub>=0.22" \
|
| 18 |
+
"gradio>=4.36" \
|
| 19 |
+
"datasets>=2.18" \
|
| 20 |
"pydantic>=2.6" \
|
| 21 |
+
"pyyaml>=6.0" \
|
| 22 |
+
gitpython
|
| 23 |
+
|
| 24 |
+
# Install project
|
| 25 |
+
RUN pip install --no-cache-dir -e "." || true
|
| 26 |
|
| 27 |
ENV PYTHONUNBUFFERED=1
|
| 28 |
ENV PYTHONPATH=/app
|
| 29 |
|
| 30 |
EXPOSE 7860
|
| 31 |
|
| 32 |
+
CMD ["python", "training/app.py"]
|