CoolFace
Apppublic

ans2004/auto_completion

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
Dockerfile21 linesDownload Raw Back to root
1# Use a newer, slim version for better performance and smaller image size2FROM python:3.11-slim3 4# Create a working directory5WORKDIR /code6 7# Copy requirements and install them8COPY ./requirements.txt /code/requirements.txt9RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt10 11# Set up a safe user (Hugging Face requirement)12RUN useradd -m -u 1000 user13USER user14ENV HOME=/home/user \15    PATH=/home/user/.local/bin:$PATH16 17WORKDIR $HOME/app18COPY --chown=user . $HOME/app19 20# Start the app on port 786021CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]