Spaces:
Paused
Paused
Update Dockerfile
Browse files123456789101112131415161718# Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker# you will also find guides on how best to write your DockerfileFROM python:3.9RUN useradd -m -u 1000 userUSER userENV PATH="/home/user/.local/bin:$PATH"WORKDIR /appRUN apt-get update && apt-get install -y ffmpeg && apt-get cleanCOPY --chown=user ./requirements.txt requirements.txtRUN pip install --no-cache-dir --upgrade -r requirements.txtCOPY --chown=user . /appCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]12345678910111213141516171819FROM ubuntu:20.04# Install Python and system dependenciesRUN apt-get update && apt-get install -y python3 python3-pip ffmpeg && apt-get clean# Set working directoryWORKDIR /app# Copy application filesCOPY . /app# Install Python dependenciesRUN pip install --no-cache-dir -r requirements.txt# Expose the application portEXPOSE 8000# Command to run the applicationCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
Dockerfile+13-12