-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile
30 lines (22 loc) · 1.03 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
# base docker image:
# make sure you pulled the docker base image: docker pull continuumio/anaconda3:latest
FROM continuumio/anaconda3
# label the docker image:
LABEL Name="lfbnet"
# setting proxies if your are behind proxy companies:
# kindly refer to: https://docs.docker.com/network/proxy/
# define working directory inside the docker image:
WORKDIR /lfbnet
# Create the environment:
COPY environment.yml .
RUN conda env create -f environment.yml
# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "myenv", "/bin/bash", "-c"]
# Copy everything in the current directory into the docker image working directory.
# Recommended not to put medical data in the current directory!
COPY . /lfbnet
# Assume requirements.txt was in the current directory, install dependencies that require pip install:
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Run the main python code when the container is started:#
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "myenv", "python", "/lfbnet/test_docker.py"]