forked from MadsBirch/mlops-sentiment-analysis
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (25 loc) · 1022 Bytes
/
Dockerfile
File metadata and controls
31 lines (25 loc) · 1022 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
# Base image
FROM python:3.10-slim
# Install python
RUN apt update && \
apt install --no-install-recommends -y build-essential gcc && \
apt clean && rm -rf /var/lib/apt/lists/*
# Copy over our application (the essential parts) from our computer to the container:
COPY requirements.txt requirements.txt
COPY setup.py setup.py
COPY test_environment.py test_environment.py
COPY src/ src/
COPY data/ data/
COPY conf/ conf/
COPY Makefile Makefile
COPY cloudbuild.yaml cloudbuild.yaml
COPY models/ models/
# Installs git into the Docker image:
RUN apt-get update && apt-get install git -y
# To use make:
RUN apt install build-essential -y --no-install-recommends
# Set the working directory in our container and add commands that install the dependencies:
WORKDIR /
RUN pip install -r requirements.txt --no-cache-dir
# Name our training script as the entrypoint (CMD) for our docker image. The entrypoint is the application that we want to run when the image is being executed:
ENTRYPOINT ["make", "cloud_train"]