-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 869 Bytes
/
Dockerfile
File metadata and controls
32 lines (25 loc) · 869 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
# Base image
FROM python:3.11-slim
# Prevent Python from writing pyc files and buffer stdout/stderr
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# System dependencies (QuantLib needs build tools)
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libquantlib0-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt \
&& pip install gunicorn
# Copy project files
COPY . .
# Expose Dash port
EXPOSE 8050
# Use Gunicorn with 4 workers for production
#CMD ["gunicorn", "rates:server", "--bind", "0.0.0.0:8050", "--workers", "4", "--worker-class", "gthread"]
#CMD ["gunicorn", "options:server", "--bind", "0.0.0.0:8050", "--workers", "4", "--worker-class", "gthread"]