testingnewcode / Dockerfile
sksameermujahid's picture
Update Dockerfile
229449b verified
raw
history blame
685 Bytes
FROM python:3.11-slim
WORKDIR /code
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
make \
git \
ffmpeg \
libsndfile1 \
portaudio19-dev \
python3-dev \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker cache
COPY ./requirements.txt /code/requirements.txt
# Install Python packages
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the rest of the application
COPY ./app.py /code/app.py
COPY ./templates /code/templates
COPY ./models /code/models
EXPOSE 7860
CMD ["python", "app.py"]