|
FROM python:3.9-slim |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
fluidsynth \ |
|
libsndfile1 \ |
|
wget \ |
|
libfreetype6-dev \ |
|
libpng-dev \ |
|
pkg-config \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
COPY . . |
|
|
|
|
|
RUN mkdir -p /app/soundfonts && \ |
|
wget -O /app/soundfonts/Trumpet.sf2 https://github.com/FluidSynth/fluidsynth/raw/master/sf2/Trumpet.sf2 && \ |
|
wget -O /app/soundfonts/Piano.sf2 https://musical-artifacts.com/artifacts/2719/GeneralUser_GS_1.471.sf2 && \ |
|
wget -O /app/soundfonts/Violin.sf2 https://musical-artifacts.com/artifacts/2744/SalC5Light.sf2 && \ |
|
wget -O /app/soundfonts/Clarinet.sf2 https://musical-artifacts.com/artifacts/2744/SalC5Light.sf2 && \ |
|
wget -O /app/soundfonts/Flute.sf2 https://musical-artifacts.com/artifacts/2744/SalC5Light.sf2 |
|
|
|
|
|
RUN mkdir -p /app/static |
|
RUN mkdir -p /app/exercise_library |
|
RUN mkdir -p /app/temp_audio |
|
|
|
|
|
ENV PYTHONUNBUFFERED=1 |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["python", "app.py"] |