bambadij commited on
Commit
c6b60d3
·
verified ·
1 Parent(s): 6af81c7
Files changed (1) hide show
  1. Dockerfile +19 -25
Dockerfile CHANGED
@@ -1,28 +1,22 @@
1
- version: "3"
2
 
3
- services:
4
- web:
5
- build: fastapi
6
- ports:
7
- -7860:8000
8
- volumes:
9
- -./fastapi:/app
10
- networks:
11
- - local-ai
12
- ollama:
13
- build: ollama
14
- ports:
15
- -11434:11434
16
- volumes:
17
- -tutorial-vol:/ollama
18
- networks:
19
- -local-ai
20
- entrypoint: ["usr/bin/bash","/pull-llama3.sh"]
21
 
22
- networks:
23
- local-ai:
24
- driver: bridge
 
 
 
 
 
 
25
 
26
- volumes:
27
- tutorial-vol:
28
- driver: local
 
 
 
 
 
 
1
+ FROM python:3.9
2
 
3
+ WORKDIR /app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
+ COPY . /app/
6
+ RUN pip install --upgrade pip
7
+ RUN apt-get update && apt-get install -y \
8
+ tesseract-ocr \
9
+ tesseract-ocr-fra \
10
+ libtesseract-dev \
11
+ && apt-get clean \
12
+ && rm -rf /var/lib/apt/lists/*
13
+ COPY requirements.txt requirements.txt
14
 
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache
18
+ ENV TRANSFORMERS_CACHE=/app/.cache
19
+ ENV HF_HOME=/app/.cache
20
+
21
+ EXPOSE 8084
22
+ CMD ["uvicorn", "app:app", "--reload", "--host", "0.0.0.0", "--port", "8084"]