Spaces:
Runtime error
Runtime error
File size: 853 Bytes
929222a 8e176c7 929222a 8e176c7 929222a 8e176c7 929222a 8e176c7 929222a 8e176c7 929222a 8e176c7 0957664 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # Use an official Python runtime as a parent image
FROM python:3.9
# Create a non-root user (good practice)
RUN useradd -m -u 1000 user
USER user
# Set path environment variable
ENV PATH="/home/user/.local/bin:${PATH}"
# Set the working directory in the container
WORKDIR /app
# Copy requirements first to leverage Docker cache
COPY --chown=user ./requirements.txt requirements.txt
# Install dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code
COPY --chown=user . /app
# Expose the port the app runs on (Hugging Face default)
EXPOSE 7860
# Run uvicorn server when the container launches
# CORRECTED: Points to 'morse_tts_server.py' and the 'app' object within it
CMD ["uvicorn", "morse_tts_server:app", "--host", "127.0.0.1", "--port", "7860"] |