Spaces:
Build error
Build error
Update Dockerfile
Browse files1123445678911101112151314181915161718211920212425262728293031323334222324252627282930313233343536373841394041421 unmodified line4445464947485249# Use Python 3.10 specifically# Force Python 3.10FROM python:3.10-slim
# Set working directoryWORKDIR /app
# Install system dependenciesRUN apt-get update && apt-get install -y \ gcc \ g++ \ make \ portaudio19-dev \ python3-pyaudio \ ffmpeg \ libsndfile1 \ && rm -rf /var/lib/apt/lists/*
# Upgrade pip and install setuptools firstRUN pip install --no-cache-dir --upgrade pip setuptools wheel# Upgrade pip and install numpy first (pre-built wheel)RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \ pip install --no-cache-dir numpy==1.23.5
# Copy requirements first (for better caching)# Copy requirementsCOPY requirements.txt .
# Install Python packages - one by one to isolate issuesRUN pip install --no-cache-dir numpy==1.23.5 && \ pip install --no-cache-dir speechrecognition==3.10.0 && \ pip install --no-cache-dir gtts==2.4.0 && \ pip install --no-cache-dir pyttsx3==2.90 && \ pip install --no-cache-dir pydub==0.25.1 && \ pip install --no-cache-dir langdetect==1.0.9 && \ pip install --no-cache-dir playsound==1.3.0 && \ pip install --no-cache-dir requests==2.31.0 && \ pip install --no-cache-dir translators==5.5.2 && \ pip install --no-cache-dir streamlit==1.28.0# Install remaining packagesRUN pip install --no-cache-dir \ speechrecognition==3.10.0 \ gtts==2.4.0 \ pyttsx3==2.90 \ pydub==0.25.1 \ langdetect==1.0.9 \ playsound==1.3.0 \ requests==2.31.0 \ translators==5.5.2 \ streamlit==1.28.0
# Copy application filesCOPY web_translator_final.py ./app.pyCOPY voice_translator_final.py ./COPY setup_voice_translator.py ./
# Create necessary directories# Create temp directoryRUN mkdir -p /tmp/audio_cache
# Set environment variables1 unmodified lineENV STREAMLIT_SERVER_PORT=7860ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
# Expose portEXPOSE 7860
# Run the applicationCMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]Dockerfile+17-21