Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# 1. Use Hugging Face recommended Python image
|
| 2 |
-
FROM python:3.12.8
|
| 3 |
|
| 4 |
# 2. Create non-root user (required by Hugging Face Spaces)
|
| 5 |
RUN useradd -m -u 1000 user
|
|
@@ -8,12 +8,9 @@ ENV PATH="/home/user/.local/bin:$PATH"
|
|
| 8 |
|
| 9 |
# 3. Set working directory
|
| 10 |
WORKDIR /app
|
| 11 |
-
|
| 12 |
-
# 4. Install essential system dependencies
|
| 13 |
-
# - switched to root temporarily
|
| 14 |
USER root
|
| 15 |
RUN apt-get update && \
|
| 16 |
-
apt-get install -y --no-install-recommends
|
| 17 |
rm -rf /var/lib/apt/lists/*
|
| 18 |
USER user
|
| 19 |
|
|
@@ -31,4 +28,4 @@ COPY --chown=user . .
|
|
| 31 |
EXPOSE 7860
|
| 32 |
|
| 33 |
# 9. Run Uvicorn server for FastAPI app
|
| 34 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
|
|
|
|
| 1 |
# 1. Use Hugging Face recommended Python image
|
| 2 |
+
FROM python:3.12.8-slim
|
| 3 |
|
| 4 |
# 2. Create non-root user (required by Hugging Face Spaces)
|
| 5 |
RUN useradd -m -u 1000 user
|
|
|
|
| 8 |
|
| 9 |
# 3. Set working directory
|
| 10 |
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
| 11 |
USER root
|
| 12 |
RUN apt-get update && \
|
| 13 |
+
apt-get install -y --no-install-recommends libpq-dev && \
|
| 14 |
rm -rf /var/lib/apt/lists/*
|
| 15 |
USER user
|
| 16 |
|
|
|
|
| 28 |
EXPOSE 7860
|
| 29 |
|
| 30 |
# 9. Run Uvicorn server for FastAPI app
|
| 31 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
|
__pycache__/chat_resources.cpython-312.pyc
DELETED
|
Binary file (3.96 kB)
|
|
|
__pycache__/main.cpython-312.pyc
DELETED
|
Binary file (2.23 kB)
|
|
|
__pycache__/optimized_quiz.cpython-312.pyc
DELETED
|
Binary file (3.81 kB)
|
|
|
requirements.txt
CHANGED
|
@@ -5,5 +5,4 @@ python-dotenv
|
|
| 5 |
groq
|
| 6 |
langchain-core
|
| 7 |
langchain-huggingface
|
| 8 |
-
langchain-chroma
|
| 9 |
-
sentence-transformers
|
|
|
|
| 5 |
groq
|
| 6 |
langchain-core
|
| 7 |
langchain-huggingface
|
| 8 |
+
langchain-chroma
|
|
|