qwen2.5-7b-4bit / Dockerfile
Gokulavelan's picture
chnages
762b3c6
raw
history blame
527 Bytes
# Use official Python image
FROM python:3.9-slim
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
HF_HOME="/app/huggingface_cache" \
TRANSFORMERS_CACHE="/app/huggingface_cache"
# Create cache directory
RUN mkdir -p $HF_HOME && chmod -R 777 $HF_HOME
# Copy app files
WORKDIR /app
COPY . .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Expose FastAPI port
EXPOSE 8000
# Run FastAPI
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]