Spaces:
Sleeping
Sleeping
Commit ·
624a711
1
Parent(s): 75e4552
modified docker file to create user and set ENV path to HOME, ensure dockerfile points to expected port 7860
Browse files1234567891011# Use an official Python runtime as a parent imageFROM python:3.10-slim# Set the working directory in the containerWORKDIR /app# Copy the current directory contents into the container at /appCOPY . /app# Install any necessary dependencies specified in requirements.txtRUN pip install --no-cache-dir -r requirements.txt123456789101112131415161718192021# Use an official Python runtime as a parent imageFROM python:3.10-slim# Set up a new user named "user" with user ID 1000RUN useradd -m -u 1000 user# Switch to the "user" userUSER user# Set home to the user's home directoryENV HOME=/home/user \PATH=/home/user/.local/bin:$PATH# Set the working directory in the containerWORKDIR $HOME/app# Copy the current directory contents into the container at $HOME/app setting the owner to the userCOPY --chown=user . $HOME/app# Install any necessary dependencies specified in requirements.txtRUN pip install --no-cache-dir -r requirements.txt
Dockerfile+13-3