File size: 498 Bytes
dc235a0
 
 
 
6635965
 
5a5f157
6635965
2b15014
dc235a0
6635965
5a5f157
26e329e
 
6635965
5a5f157
 
f1dcc02
 
6635965
7db839c
dc235a0
2b15014
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.9-slim

WORKDIR /app

# Copy requirements + setup.py
COPY requirements.txt setup.py ./

# dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Hugging Face cache
ENV HF_HOME=/app/.cache
RUN mkdir -p /app/.cache && chmod -R 777 /app/.cache

# Pre-download model
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"

COPY . .

# Expose port Hugging Face
EXPOSE 7860

CMD ["python", "app.py"]