-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (28 loc) · 931 Bytes
/
Copy pathDockerfile
File metadata and controls
35 lines (28 loc) · 931 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
FROM python:3.12-slim
# Install necessary tools and libraries for compiling dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
make \
python3-dev \
libffi-dev \
libssl-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Set the working directory inside the container
WORKDIR /app
# Copy the necessary files
COPY requirements.txt /app/
COPY README.md /app/
COPY setup.py /app/
COPY ./src /app/src
COPY ./artifacts /app/artifacts
COPY ./dataset /app/dataset
# Set the PYTHONPATH to include the /app directory
ENV PYTHONPATH=/app
# Upgrade pip, setuptools, and wheel, then install dependencies
RUN pip install --upgrade pip setuptools wheel \
&& pip install -r requirements.txt
# Expose a port for monitoring (TensorBoard or other tools)
EXPOSE 6006
# Set the default command to run your application
CMD ["python", "src/components/data_ingestion.py"]