File size: 570 Bytes
60ff8af 3656aa6 a9b226f de807cc 3656aa6 bba247e 60ff8af be2b39e bba247e 5e09876 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
FROM python:3.10
ENV HF_HOME=/app/hf_cache
#ENV TRANSFORMERS_CACHE=/app/hf_cache
RUN apt-get update && apt-get install -y \
gcc \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /app/hf_cache
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
RUN python -c "from transformers import AutoModelForCausalLM, AutoTokenizer; AutoModelForCausalLM.from_pretrained('Locutusque/TinyMistral-248M'); AutoTokenizer.from_pretrained('Locutusque/TinyMistral-248M')"
COPY . .
EXPOSE 7860
CMD ["python", "app.py"] |