-
Notifications
You must be signed in to change notification settings - Fork 107
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 1.01 KB
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
# Use the official Python 3.10 slim image
FROM python:3.10-slim
# Set the working directory inside the container
WORKDIR /app
# Install system dependencies including build tools and MariaDB development files
RUN apt-get update && \
apt-get install -y \
build-essential \
pkg-config \
python3-dev \
libmariadb-dev-compat \
libmariadb-dev \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip (optional but recommended)
RUN pip install --upgrade pip
# Copy the requirements.txt file from the correct relative path into the container
COPY Sprint_1/AI_Fitness_Project/requirements.txt /app/requirements.txt
# Install Python dependencies from requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# Copy the rest of your application code into the container
COPY Sprint_1/AI_Fitness_Project /app
# Set environment variables (using the recommended syntax)
ENV PYTHONUNBUFFERED=1
# Expose the port your app uses (adjust if needed)
EXPOSE 5000
# Run the application
CMD ["python", "/app/app.py"]