xaix / Dockerfile
reikernx's picture
Update Dockerfile
311ad31 verified
Raw
History Blame Contribute Delete
484 Bytes
FROM python:3.10-slim
WORKDIR /app
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN python -c "from transformers import AutoTokenizer, AutoModelForCausalLM; \
model_name='Qwen/Qwen3-1.7B'; \
AutoTokenizer.from_pretrained(model_name); \
AutoModelForCausalLM.from_pretrained(model_name)"
COPY app.py .
RUN chmod -R 777 /app
EXPOSE 7860
CMD ["python", "app.py"]