CoolFace
Apppublic

RanM/CoreferenceResolution

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
Dockerfile42 linesDownload Raw Back to root
1# Use the official Python image from the Docker library2FROM python:3.10-slim3 4# Set the working directory5WORKDIR /app6 7# Install system dependencies8RUN apt-get update && apt-get install -y \9    git \10    libgl1-mesa-glx \11    libglib2.0-0 \12    && rm -rf /var/lib/apt/lists/*13 14# Set environment variables15ENV TRANSFORMERS_CACHE=/tmp/transformers_cache16ENV MPLCONFIGDIR=/tmp/.matplotlib17 18# Set up a new user named "user" with user ID 100019RUN useradd -m -u 1000 user20 21# Switch to the "user" user22USER user23 24# Set home to the user's home directory25ENV HOME=/home/user \26    PATH=/home/user/.local/bin:$PATH27 28# Set the working directory to the user's home directory29WORKDIR $HOME/app30 31# Copy the application code into the container and set the owner to the user32COPY --chown=user . $HOME/app33 34# Install Python dependencies35RUN pip install --no-cache-dir -r requirements.txt36 37# Expose the port the app runs on38EXPOSE 786039 40# Command to run the application41CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]42