-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (30 loc) · 1.46 KB
/
Dockerfile
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
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/go/dockerfile-reference/
# Want to help us make this template better? Share your feedback here: https://forms.gle/ybq9Krt8jtBL3iCk7
ARG PYTHON_VERSION=3.10.14
FROM python:${PYTHON_VERSION}-slim as base
# Prevents Python from writing pyc files.
ENV PYTHONDONTWRITEBYTECODE=1
# Keeps Python from buffering stdout and stderr to avoid situations where
# the application crashes without emitting any logs due to buffering.
ENV PYTHONUNBUFFERED=1
# Setting up MLFlow Environment Variables
ENV MLFLOW_TRACKING_URI=https://dagshub.com/sudhanshusinghaiml/CVProject-Chest-Disease-Classification.mlflow
ENV MLFLOW_TRACKING_USERNAME=sudhanshusinghaiml
ENV MLFLOW_TRACKING_PASSWORD=<password>
# Setting up Working directory
WORKDIR /app
# Copy the source code into the container.
COPY . /app
# To signify root directory of application
RUN touch /app/.project-root
# Run requirements.txt to install all dependencies
RUN pip install -r requirements.txt
# Initializing dvc
RUN dvc init --no-scm
# Expose the port that the application listens on.
EXPOSE 8080
# Run the application.
# CMD ["gunicorn", "app:ChestDiseaseClassificationApp", "--workers", "2", "--threads", "2", "--worker-class", "gthread", "-b", "0.0.0.0:8080"]
CMD gunicorn app:ChestDiseaseClassificationApp --workers=2 --threads=2 --worker-class=gthread -b 0.0.0.0:8080