quantumbit commited on
Commit
a086a64
·
verified ·
1 Parent(s): 6e4458f

Delete Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +0 -74
Dockerfile DELETED
@@ -1,74 +0,0 @@
1
- FROM python:3.10-slim
2
-
3
- # Set working directory
4
- WORKDIR /app
5
-
6
- # Install system dependencies for multi-format document processing
7
- RUN apt-get update && apt-get install -y \
8
- curl \
9
- libgl1-mesa-glx \
10
- libglib2.0-0 \
11
- libsm6 \
12
- libxext6 \
13
- libxrender-dev \
14
- libgomp1 \
15
- libgstreamer1.0-0 \
16
- libavcodec-dev \
17
- libavformat-dev \
18
- libswscale-dev \
19
- && rm -rf /var/lib/apt/lists/*
20
-
21
- # Create cache directories with proper permissions before copying files
22
- RUN mkdir -p /app/.cache/huggingface && \
23
- mkdir -p /app/.cache/sentence_transformers && \
24
- chmod -R 777 /app/.cache
25
-
26
- # Set environment variables for HuggingFace cache (before installing packages)
27
- ENV HF_HOME=/app/.cache/huggingface
28
- ENV TRANSFORMERS_CACHE=/app/.cache/huggingface
29
- ENV SENTENCE_TRANSFORMERS_HOME=/app/.cache/sentence_transformers
30
- ENV HF_HUB_CACHE=/app/.cache/huggingface
31
-
32
- # Copy requirements first for better Docker layer caching
33
- COPY requirements.txt .
34
-
35
- # Install Python dependencies
36
- RUN pip install --no-cache-dir -r requirements.txt
37
-
38
- # Copy application files AND folder structure
39
- COPY *.py ./
40
- COPY *.sh ./
41
- COPY requirements.txt ./
42
- COPY *.md ./
43
- COPY api/ ./api/
44
- COPY config/ ./config/
45
- COPY LLM/ ./LLM/
46
- COPY RAG/ ./RAG/
47
- COPY logger/ ./logger/
48
- COPY preprocessing/ ./preprocessing/
49
-
50
- # Set up directories and permissions during build (when we have root access)
51
- RUN mkdir -p /app/.cache/huggingface && \
52
- mkdir -p /app/.cache/sentence_transformers && \
53
- chmod -R 777 /app/.cache && \
54
- chmod +x startup.sh && \
55
- if [ -d "RAG/rag_embeddings" ]; then \
56
- find RAG/rag_embeddings -name "*.lock" -delete 2>/dev/null || true; \
57
- find RAG/rag_embeddings -name "*.db-shm" -delete 2>/dev/null || true; \
58
- find RAG/rag_embeddings -name "*.db-wal" -delete 2>/dev/null || true; \
59
- chmod -R 755 RAG/rag_embeddings; \
60
- fi
61
-
62
- # Expose port
63
- EXPOSE 7860
64
-
65
- # Set environment variables
66
- ENV HOST=0.0.0.0
67
- ENV PORT=7860
68
-
69
- # Health check
70
- HEALTHCHECK --interval=30s --timeout=30s --start-period=60s --retries=3 \
71
- CMD curl -f http://localhost:7860/health || exit 1
72
-
73
- # Run the application
74
- CMD ["bash", "startup.sh"]