-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
34 lines (23 loc) · 916 Bytes
/
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
# Use latest Python runtime as a parent image
FROM python:3.6.5-slim
# Meta-data
LABEL maintainer="Shuyib" \
description="Docker Data Science workflow: Feature engineering and modelling for the pima dataset."
# Set the working directory to /app
WORKDIR /app
# ensures that the python output is sent to the terminal without buffering
ENV PYTHONUNBUFFERED=TRUE
# Copy the current directory contents into the container at /app
COPY . /app
# create a virtual environment and activate it
RUN python3 -m venv ml-env
# activate virtual environment
CMD source ml-env/bin/activate
# Install the required libraries
RUN pip --no-cache-dir install -r /app/requirements.txt
# Make port 9999 available to the world outside this container
EXPOSE 9999
# Create mountpoint
VOLUME /app
# Run jupyter when container launches
CMD ["jupyter", "notebook", "--ip='*'", "--port=9999", "--no-browser", "--allow-root"]