Tanishq Salkar
docker file added
b6167fa
raw
history blame contribute delete
552 Bytes
# Use lightweight Python
FROM python:3.10-slim
# Create user
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# Install dependencies
COPY --chown=user requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy all your python files
COPY --chown=user . .
# Create the debug directory (required by your utils)
RUN mkdir -p debug_artifacts
# Expose port
EXPOSE 7860
# Start the API
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]