rahuln2002 commited on
Commit
4df6aed
·
verified ·
1 Parent(s): c965e8a

Update Dockerfile

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