-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (33 loc) · 984 Bytes
/
Copy pathDockerfile
File metadata and controls
42 lines (33 loc) · 984 Bytes
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
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY pyproject.toml ./
# Install Python dependencies
RUN pip install --no-cache-dir \
flask>=3.1.1 \
flask-sqlalchemy>=3.1.1 \
gunicorn>=23.0.0 \
midiutil>=1.2.1 \
nltk>=3.9.1 \
spacy>=3.8.7 \
sqlalchemy>=2.0.41 \
textblob>=0.19.0 \
werkzeug>=3.1.3 \
email-validator>=2.2.0 \
psycopg2-binary>=2.9.10
# Download spacy model and NLTK data
RUN python -m spacy download en_core_web_sm && \
python -m textblob.download_corpora && \
python -c "import nltk; nltk.download('punkt'); nltk.download('cmudict')"
# Copy application code
COPY . .
# Create directories for MIDI files and database
RUN mkdir -p static/midi instance
# Expose port
EXPOSE 5000
# Run gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "4", "--timeout", "120", "app:app"]