CoolFace
Apppublic

griddava/pull-request-validator

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
Dockerfile24 linesDownload Raw Back to root
1# Use the official Python 3.9 slim image2FROM python:3.9-slim3 4# Set the working directory inside the container5WORKDIR /code6 7# Create a directory for the model cache and make it world-writable.8# This ensures that the non-root user running the app can write to it,9# without needing to know the user's name during the build.10RUN mkdir /code/cache && chmod 777 /code/cache11 12# Set the HF_HOME environment variable to point to our new cache directory.13ENV HF_HOME /code/cache14 15# Copy the requirements file and install dependencies16COPY ./requirements.txt /code/requirements.txt17RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt18 19# Copy the application code20COPY ./main.py /code/main.py21 22# Command to run the FastAPI server.23# The Hugging Face platform will run this command as a non-root user.24CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]