minzo456 commited on
Commit
f721ff8
·
verified ·
1 Parent(s): 4b523c0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -12
Dockerfile CHANGED
@@ -1,22 +1,16 @@
1
  FROM python:3.10-slim
2
 
3
- # Build essentials install කිරීම (Compiling වේගවත් කිරීමට)
4
- RUN apt-get update && apt-get install -y \
5
- build-essential \
6
- python3-dev \
7
- && rm -rf /var/lib/apt/lists/*
8
-
9
  WORKDIR /code
10
 
11
- # Pre-built wheel එක හරහා llama-cpp install කිරීම (විනාඩි 10ක් ඉතිරි කරයි)
12
- RUN pip install --no-cache-dir --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu llama-cpp-python
13
-
14
- # අනෙකුත් අවශ්‍යතා install කිරීම
15
  COPY requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
18
- # සියලුනු copy කිරීම
 
 
 
19
  COPY . .
20
 
21
- # Flask app එක run කිරීම (Hugging Face port 7860)
22
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
 
 
 
 
 
 
3
  WORKDIR /code
4
 
5
+ # පද්ධතියට අවශ්‍ය libraries install කිරීම
 
 
 
6
  COPY requirements.txt .
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
9
+ # මොඩල් එක load කිරීමට අවශ්‍ය cache folder එක සෑදීම
10
+ RUN mkdir -p /data/cache
11
+ ENV TRANSFORMERS_CACHE=/data/cache
12
+
13
  COPY . .
14
 
15
+ # Flask app එක run කිරීම
16
  CMD ["python", "app.py"]