# Use an official Python image as the base image FROM python:3.8-slim # Install system dependencies RUN apt-get update && apt-get install RUN useradd -m -u 1000 user USER user ENV PATH="/home/user/.local/bin:$PATH" # Set the working directory inside the container WORKDIR /app # Install PyTorch RUN pip install --upgrade pip RUN pip install torch torchvision # Install Hugging Face Transformers and other dependencies RUN pip install transformers librosa deep-translator python-multipart fastapi uvicorn sentencepiece # Copy the main script COPY --chown=user main.py . # Expose the port the app runs on EXPOSE 7860 # Set the default command to run your FastAPI app or any other server CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]