Medical-Chatbot-API / Dockerfile
khalednabawi11's picture
Create Dockerfile
d5a3a91 verified
raw
history blame
614 Bytes
FROM python:3.9-slim
# Set working directory
WORKDIR /code
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install
COPY app/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the entire app folder
COPY app/ ./app/
# Set the working directory to app/
WORKDIR /code/app
# Expose the port
EXPOSE 7860
# Environment variables (optional)
ENV HOST=0.0.0.0
ENV PORT=7860
# Run the FastAPI app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]