Embedding_fastapi / Dockerfile
Ezhil
modified code
f7821f2
raw
history blame contribute delete
453 Bytes
# Use official Python image as the base
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Copy requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
RUN useradd -m appuser
USER appuser
# Expose the FastAPI app port
EXPOSE 7860
# Run the application with Uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]