mithra99 commited on
Commit
ccc278b
·
1 Parent(s): 9cb74e1

Remove ngrok completely - simplify deployment to just FastAPI

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -17
Dockerfile CHANGED
@@ -3,7 +3,7 @@ FROM python:3.10-slim
3
 
4
  # System dependencies for OCR and PDF processing
5
  RUN apt-get update && \
6
- apt-get install -y tesseract-ocr poppler-utils curl unzip libgl1 libglib2.0-0 && \
7
  rm -rf /var/lib/apt/lists/*
8
 
9
  # Set workdir
@@ -17,22 +17,11 @@ RUN mkdir -p ./uploaded_docs
17
  # Install Python dependencies
18
  RUN pip install --upgrade pip && pip install -r requirements.txt
19
 
20
- # Download and install ngrok
21
- RUN curl -s https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz | tar -xz -C /usr/local/bin
22
 
23
- # Expose FastAPI and ngrok dashboard ports
24
- EXPOSE 8000 4040
25
-
26
- # Copy entrypoint script
27
- COPY --from=busybox:latest /bin/sh /bin/sh
28
- COPY --from=busybox:latest /bin/sleep /bin/sleep
29
-
30
- # Entrypoint script to start both FastAPI and ngrok
31
- COPY docker-entrypoint.sh /docker-entrypoint.sh
32
- RUN chmod +x /docker-entrypoint.sh
33
-
34
- # Set environment variables (ngrok authtoken and Mistral API key can be set at runtime)
35
- ENV NGROK_AUTHTOKEN=""
36
  ENV MISTRAL_API_KEY=""
37
 
38
- ENTRYPOINT ["/docker-entrypoint.sh"]
 
 
3
 
4
  # System dependencies for OCR and PDF processing
5
  RUN apt-get update && \
6
+ apt-get install -y tesseract-ocr poppler-utils libgl1 libglib2.0-0 && \
7
  rm -rf /var/lib/apt/lists/*
8
 
9
  # Set workdir
 
17
  # Install Python dependencies
18
  RUN pip install --upgrade pip && pip install -r requirements.txt
19
 
20
+ # Expose FastAPI port
21
+ EXPOSE 8000
22
 
23
+ # Set environment variables
 
 
 
 
 
 
 
 
 
 
 
 
24
  ENV MISTRAL_API_KEY=""
25
 
26
+ # Start FastAPI application
27
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]