Spaces:
Sleeping
Sleeping
Update dockerfile
Browse files- Dockerfile +3 -30
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM python:3.13
|
| 2 |
|
| 3 |
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
| 4 |
|
|
@@ -9,36 +9,9 @@ RUN apt-get update && \
|
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
COPY src/ src/
|
| 12 |
-
COPY packages/data_prep/generated/ packages/data_prep/generated/
|
| 13 |
|
| 14 |
-
RUN uv
|
| 15 |
-
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
|
| 16 |
-
"gradio>=6.12.0" \
|
| 17 |
-
"huggingface-hub>=0.30.0" \
|
| 18 |
-
"llama-cpp-python>=0.3.19" \
|
| 19 |
-
"llama-index>=0.14.20" \
|
| 20 |
-
"llama-index-embeddings-huggingface>=0.7.0" \
|
| 21 |
-
"numpy>=2.0.0"
|
| 22 |
-
|
| 23 |
-
RUN useradd -m -u 1000 user
|
| 24 |
-
USER user
|
| 25 |
-
|
| 26 |
-
ENV HOME=/home/user \
|
| 27 |
-
PYTHONPATH=/app/src \
|
| 28 |
-
GRADIO_SERVER_NAME=0.0.0.0
|
| 29 |
-
|
| 30 |
-
RUN python -c "\
|
| 31 |
-
from huggingface_hub import hf_hub_download, list_repo_files; \
|
| 32 |
-
files = list_repo_files('Jackrong/Qwen3.5-4B-Neo-GGUF'); \
|
| 33 |
-
gguf = [f for f in files if f.endswith('.gguf')]; \
|
| 34 |
-
target = next((f for f in gguf if 'Q4_K_M' in f.upper()), gguf[0]); \
|
| 35 |
-
print(f'Downloading {target}...'); \
|
| 36 |
-
hf_hub_download('Jackrong/Qwen3.5-4B-Neo-GGUF', target)"
|
| 37 |
-
|
| 38 |
-
RUN python -c "\
|
| 39 |
-
from llama_index.embeddings.huggingface import HuggingFaceEmbedding; \
|
| 40 |
-
HuggingFaceEmbedding(model_name='BAAI/bge-small-en-v1.5')"
|
| 41 |
|
| 42 |
EXPOSE 7860
|
| 43 |
|
| 44 |
-
CMD ["
|
|
|
|
| 1 |
+
FROM python:3.13
|
| 2 |
|
| 3 |
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
| 4 |
|
|
|
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
COPY src/ src/
|
|
|
|
| 12 |
|
| 13 |
+
RUN uv sync --frozen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
+
CMD ["uv", "run", "-m", "big_data_application"]
|