Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files10 unmodified lines1112131415161718192021222310 unmodified linesWORKDIR /codeCOPY ./requirements.txt /code/requirements.txtRUN pip install --no-cache-dir --upgrade -r /code/requirements.txt# For headless matplotlibENV MPLBACKEND=AggCOPY . /code/# Make sure the app.py file is correctly namedCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]10 unmodified lines111213141516171819202122232425262728293031323310 unmodified linesWORKDIR /code# Create a non-root user to run the applicationRUN useradd -m appuser# Create directories with appropriate permissionsRUN mkdir -p /code/output && \chown -R appuser:appuser /codeCOPY --chown=appuser:appuser ./requirements.txt /code/requirements.txtRUN pip install --no-cache-dir --upgrade -r /code/requirements.txt# For headless matplotlibENV MPLBACKEND=AggCOPY --chown=appuser:appuser . /code/# Switch to the non-root userUSER appuser# Make sure the app.py file is correctly namedCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+12-2