llm_host / Dockerfile
Bahodir Nematjonov
debuging docker
e5cbb51
raw
history blame
526 Bytes
# Use a lightweight Python image
FROM python:3.9
# Set working directory
WORKDIR /code
# Install system dependencies required for PostgreSQL and transformers
RUN apt-get update && apt-get install -y \
libpq-dev \
python3-dev \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements.txt and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Expose FastAPI port
EXPOSE 7860
# Start FastAPI
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]