Translator / Dockerfile
5t4l1n's picture
Create Dockerfile
bb7c0a4 verified
Raw
History Blame Contribute Delete
451 Bytes
# Use a slim Python 3.10 image
FROM python:3.10-slim
# Set working directory inside the container
WORKDIR /usr/src/app
# Copy source files into container
COPY . .
# Install required Python packages
RUN pip install --no-cache-dir gradio transformers torch
# Expose the port Gradio runs on
EXPOSE 7860
# Environment variable for Gradio to listen on all interfaces
ENV GRADIO_SERVER_NAME="0.0.0.0"
# Command to run the app
CMD ["python", "app.py"]