-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (34 loc) · 908 Bytes
/
Dockerfile
File metadata and controls
42 lines (34 loc) · 908 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
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
# Set working directory
WORKDIR /app
# Install system dependencies for Prophet and others
RUN apt-get update && apt-get install -y \
build-essential \
libpq-dev \
gcc \
g++ \
curl \
libatlas-base-dev \
libblas-dev \
liblapack-dev \
libgfortran5 \
libffi-dev \
libpython3-dev \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the code
COPY . .
# Optional: run migrations here or in entrypoint
# RUN python forecast_system/manage.py migrate
# Copy and set permissions for entrypoint
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Set entrypoint
ENTRYPOINT ["/entrypoint.sh"]