rahuln2002 commited on
Commit
585d0be
·
verified ·
1 Parent(s): a6a53e1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -4
Dockerfile CHANGED
@@ -1,12 +1,11 @@
1
  FROM python:3.12.9-slim-bookworm
2
  WORKDIR /app
3
  COPY requirements.txt .
 
4
  RUN pip install --no-cache-dir -r requirements.txt
5
  RUN mkdir -p /app/logs && chmod 777 /app/logs
6
  RUN python -c "from transformers import AutoModelForSeq2SeqLM; AutoModelForSeq2SeqLM.from_pretrained('facebook/bart-large-cnn')"
7
- RUN apt update && apt install -y curl
8
- RUN curl -fsSL https://ollama.com/install.sh | sh
9
- RUN ollama serve & sleep 5 && ollama pull nomic-embed-text
10
  COPY . .
11
  EXPOSE 7860
12
- CMD ollama serve & python app.py
 
1
  FROM python:3.12.9-slim-bookworm
2
  WORKDIR /app
3
  COPY requirements.txt .
4
+ RUN apt update && apt install -y curl git
5
  RUN pip install --no-cache-dir -r requirements.txt
6
  RUN mkdir -p /app/logs && chmod 777 /app/logs
7
  RUN python -c "from transformers import AutoModelForSeq2SeqLM; AutoModelForSeq2SeqLM.from_pretrained('facebook/bart-large-cnn')"
8
+ RUN curl -fsSL https://ollama.com/install.sh -o install.sh && chmod +x install.sh && ./install.sh && rm install.sh
 
 
9
  COPY . .
10
  EXPOSE 7860
11
+ CMD ["sh", "-c", "ollama serve & sleep 5 && ollama pull nomic-embed-text && python app.py"]