KurdishTranslatorAPI / Dockerfile
gresqdf's picture
port
48e9e1d
raw
history blame
746 Bytes
# Use an official Python image as the base image
FROM python:3.8-slim
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 system dependencies
RUN apt-get update && apt-get install
# 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
# 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"]