Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files123456789101112131415161718192021222324252627282930# Use the official Python image as the base imageFROM python:3.9-slim# Set environment variables for PythonENV PYTHONDONTWRITEBYTECODE 1ENV PYTHONUNBUFFERED 1# Install system dependenciesRUN apt-get update \&& apt-get install -y --no-install-recommends \wget \unzip \&& apt-get clean \&& rm -rf /var/lib/apt/lists/*# Install necessary Python packagesRUN pip install --upgrade pipRUN pip install gradio transformers huggingface_hub# Set working directory in the containerWORKDIR /app# Copy the Python script and model files into the containerCOPY app.py /app/# Expose port 7860 (default port for Gradio interface)EXPOSE 7860# Command to run the Python script with uvicorn when the container startsCMD ["python", "app.py"]123456789101112131415161718192021222324252627282930# Use official Python imageFROM python:3.9-slim# Set environment variablesENV PYTHONDONTWRITEBYTECODE 1ENV PYTHONUNBUFFERED 1# Install system dependencies (if needed)RUN apt-get update && apt-get install -y \wget \unzip \&& rm -rf /var/lib/apt/lists/*# Set working directoryWORKDIR /app# Copy requirements fileCOPY requirements.txt .# Install Python dependenciesRUN pip install --use-deprecated=legacy-resolver -r requirements.txt# Copy application filesCOPY . /app# Expose necessary portsEXPOSE 7860# Command to run the applicationCMD ["python", "app.py"]
Dockerfile+17-17