brendon-ai commited on
Commit
16bea09
·
verified ·
1 Parent(s): a1ab2ef

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -40,11 +40,11 @@ RUN mkdir -p /app/.ollama/models && \
40
  COPY app.py .
41
  COPY startup.sh .
42
 
43
- # Fix line endings of startup.sh (CRITICAL for "exec format error")
44
- RUN dos2unix startup.sh
45
 
46
- # Make startup script executable
47
- RUN chmod +x startup.sh
48
 
49
  # Set environment variables for Ollama
50
  ENV OLLAMA_HOST=0.0.0.0:11434
@@ -58,5 +58,5 @@ EXPOSE 7860 11434
58
  HEALTHCHECK --interval=30s --timeout=30s --start-period=60s --retries=3 \
59
  CMD curl -f http://localhost:7860/health || exit 1
60
 
61
- # Start both Ollama server and FastAPI app
62
- CMD ["./startup.sh"]
 
40
  COPY app.py .
41
  COPY startup.sh .
42
 
43
+ # Fix line endings and make startup script executable
44
+ RUN dos2unix startup.sh && chmod +x startup.sh
45
 
46
+ # Verify the script has correct shebang and permissions
47
+ RUN head -1 startup.sh && ls -la startup.sh
48
 
49
  # Set environment variables for Ollama
50
  ENV OLLAMA_HOST=0.0.0.0:11434
 
58
  HEALTHCHECK --interval=30s --timeout=30s --start-period=60s --retries=3 \
59
  CMD curl -f http://localhost:7860/health || exit 1
60
 
61
+ # Start both Ollama server and FastAPI app using bash explicitly
62
+ CMD ["/bin/bash", "./startup.sh"]