text-image / Dockerfile
speedartificialintelligence1122's picture
Create Dockerfile
4fff39b verified
raw
history blame
404 Bytes
FROM python:3.9
# Create non-root user
RUN useradd -m -u 1000 user
USER user
# Set up path and working directory
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Copy files
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
# Start server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]