TraductAL / docker /Dockerfile
Norelad's picture
Upload folder using huggingface_hub
40bcd86 verified
Raw History Blame Contribute Delete
969 Bytes
# Dockerfile for TraductAL - HuggingFace Spaces (Docker SDK)
# Serves the Gradio application with Apertus-8B (Apache-2.0).
FROM python:3.11-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
HF_HOME=/tmp/cache \
TOKENIZERS_PARALLELISM=false \
GRADIO_SERVER_NAME=0.0.0.0 \
GRADIO_SERVER_PORT=7860
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
&& rm --no-install-recommends -y /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir -r requirements.txt
# Copy application files
COPY gradio_app.py .
COPY unified_translator.py .
COPY apertus_translator.py .
COPY apertus_trealla_hybrid.py .
COPY whisper_stt.py .
COPY tts_engine.py .
COPY text_chunker.py .
COPY startup_check.py .
COPY glossary_parser/ ./glossary_parser/
# Launch the interface
EXPOSE 7860
CMD ["python3", "gradio_app.py"]