Kalpokoch commited on
Commit
344f629
·
verified ·
1 Parent(s): 8cd7201

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -16
Dockerfile CHANGED
@@ -1,38 +1,23 @@
1
- # FINAL DOCKERFILE
2
-
3
- # Use the standard Python 3.11 image for maximum compatibility
4
  FROM python:3.11
5
 
6
- # Install system dependencies needed for compilation
7
  RUN apt-get update && apt-get install -y \
8
  curl build-essential cmake \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
  WORKDIR /app
12
 
13
- # Create writable directories
14
  RUN mkdir -p /app/.cache /app/vector_database && chmod -R 777 /app
15
 
16
- # --- THE KEY FIX ---
17
- # Set CMAKE_ARGS to tell llama-cpp-python to build without GPU support,
18
- # which makes the compilation faster.
19
  ENV TRANSFORMERS_CACHE=/app/.cache \
20
  HF_HOME=/app/.cache \
21
  CHROMADB_DISABLE_TELEMETRY=true \
22
  CMAKE_ARGS="-DLLAMA_CUBLAS=OFF"
23
 
24
- # Copy and install Python requirements.
25
- # THIS STEP WILL BE VERY SLOW. Please allow up to 30 minutes.
26
  COPY requirements.txt .
27
  RUN pip install --no-cache-dir -r requirements.txt
28
 
29
- # Copy the application code
30
  COPY . .
31
 
32
- # --- NOTE: The model is downloaded by app.py at runtime ---
33
-
34
- # Expose the application port
35
  EXPOSE 7860
36
 
37
- # Run the FastAPI application
38
- CMD ["uvicorn", "app.app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
1
  FROM python:3.11
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  curl build-essential cmake \
5
  && rm -rf /var/lib/apt/lists/*
6
 
7
  WORKDIR /app
8
 
 
9
  RUN mkdir -p /app/.cache /app/vector_database && chmod -R 777 /app
10
 
 
 
 
11
  ENV TRANSFORMERS_CACHE=/app/.cache \
12
  HF_HOME=/app/.cache \
13
  CHROMADB_DISABLE_TELEMETRY=true \
14
  CMAKE_ARGS="-DLLAMA_CUBLAS=OFF"
15
 
 
 
16
  COPY requirements.txt .
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
 
19
  COPY . .
20
 
 
 
 
21
  EXPOSE 7860
22
 
23
+ CMD ["uvicorn", "app.app:app", "--host", "0.0.0.0", "--port", "7860"]