Upload Dockerfile
#2
by noah33565 - opened
- Dockerfile +50 -0
Dockerfile
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
| 6 |
+
build-essential \
|
| 7 |
+
curl \
|
| 8 |
+
git \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
+
COPY requirements.txt .
|
| 12 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
+
|
| 14 |
+
# Copy ALL application files
|
| 15 |
+
COPY app.py .
|
| 16 |
+
COPY plugins/ plugins/
|
| 17 |
+
|
| 18 |
+
# Copy ALL HTML files
|
| 19 |
+
COPY auth_login.html .
|
| 20 |
+
COPY auth_register.html .
|
| 21 |
+
COPY index_ultimate.html .
|
| 22 |
+
COPY settings.html .
|
| 23 |
+
|
| 24 |
+
# Copy templates folder
|
| 25 |
+
COPY templates/ templates/
|
| 26 |
+
|
| 27 |
+
# Copy static files if exists
|
| 28 |
+
COPY static/ static/
|
| 29 |
+
|
| 30 |
+
# Copy Python modules
|
| 31 |
+
COPY *.py ./
|
| 32 |
+
|
| 33 |
+
# Copy training data
|
| 34 |
+
COPY training_*.json ./
|
| 35 |
+
COPY translations.json .
|
| 36 |
+
|
| 37 |
+
# Create data directories
|
| 38 |
+
RUN mkdir -p noahski_data/knowledge noahski_data/cache noahski_data/generated_media noahski_data/uploads logs
|
| 39 |
+
|
| 40 |
+
# HF Spaces uses port 7860!
|
| 41 |
+
EXPOSE 7860
|
| 42 |
+
|
| 43 |
+
ENV PYTHONUNBUFFERED=1
|
| 44 |
+
ENV SERVER_HOST=0.0.0.0
|
| 45 |
+
ENV SERVER_PORT=7860
|
| 46 |
+
|
| 47 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
| 48 |
+
CMD curl -f http://localhost:7860/health || exit 1
|
| 49 |
+
|
| 50 |
+
CMD ["python", "app.py"]
|