Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files1212344567891011121371415910161718192021151617222324212223252627282529303132# Use an official Python runtime as a parent imageFROM python:3.9# Use NVIDIA's CUDA base image with PythonFROM nvidia/cuda:11.8.0-runtime-ubuntu20.04
# Install required system dependencies# Set environment variablesENV LANG=C.UTF-8 LC_ALL=C.UTF-8ENV PATH="/usr/local/bin:$PATH"
# Install Python and other dependenciesRUN apt-get update && apt-get install -y \ python3 \ python3-pip \ python3-dev \ libgl1-mesa-glx \ && rm -rf /var/lib/apt/lists/* && apt-get clean && rm -rf /var/lib/apt/lists/*
# Create a non-root user with a home directoryRUN useradd -m -u 1000 user# Create a non-root userRUN useradd -m user
# Set the user to the non-root userUSER user
# Add the user's local bin to the PATHENV PATH="/home/user/.local/bin:$PATH"
# Set the working directory to /appWORKDIR /app
# Copy the requirements.txt file and install any dependenciesCOPY --chown=user ./requirements.txt /app/requirements.txtRUN pip install --no-cache-dir --upgrade -r /app/requirements.txt# Copy the requirements.txt file and install dependenciesCOPY --chown=user requirements.txt /app/requirements.txtRUN pip3 install --no-cache-dir --upgrade -r /app/requirements.txt
# Copy the current directory contents into the container at /app# Copy the application code into the containerCOPY --chown=user . /app
# Create the folders for uploads and results with appropriate permissionsDockerfile+17-13