Spaces:
Sleeping
Sleeping
Create app.py
Browse files1234567891011121314151617181920212223242526FROM nvidia/cuda:11.6.2-base-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractiveWORKDIR /code
# Install Python and dependenciesRUN apt-get update && \ apt-get install -y python3 python3-pip git && \ apt-get clean && \ rm -rf /var/lib/apt/lists/*
# Copy requirements and installCOPY requirements.txt .RUN pip3 install --no-cache-dir -r requirements.txt
# Copy app filesCOPY app.py .
# Set environment variables for HFENV HF_HOME=/code
# Expose portEXPOSE 7860
# Run the application with proper host to expose externallyCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]app.pyAdded+26