Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files112344567789101111121314141516171819202021# 1. Use Python# 1. Use Python ImageFROM python:3.9
# 2. Set up the folder# 2. Set Working DirectoryWORKDIR /code
# 3. Install dependencies# 3. Copy Requirements & InstallCOPY ./requirements.txt /code/requirements.txtRUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# 4. Copy your app code# 4. COPY EVERYTHING (This copies index.html, app.py, and your src/ folder)COPY . /code
# 5. Create a user (Security requirement for Hugging Face)# 5. Create User (Hugging Face Security Requirement)RUN useradd -m -u 1000 userUSER userENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH
# 6. Run the app on port 7860# 6. Run the App using the new filename 'app.py'CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]Dockerfile+6-6