-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (29 loc) · 1.06 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
# Use an official Python runtime as a parent image
FROM continuumio/miniconda3:4.10.3
# Set the working directory in the container to /onnx-stan
WORKDIR /onnx-stan
# Add the current directory contents into the container at /onnx-stan
ADD . /onnx-stan
# Install any needed packages specified in requirements.txt
RUN pip install --trusted-host pypi.python.org -r requirements.txt
# Install ONNX and ONNX Runtime
RUN pip install onnx==1.10.1 onnxruntime==1.9.0
# Install other necessary packages
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
protobuf-compiler \
libprotobuf-dev \
libboost-all-dev
# Create the Conda environment and install cmdstan
RUN conda create -n stan -c conda-forge cmdstan
RUN echo "source activate stan" > ~/.bashrc
ENV PATH /opt/conda/envs/stan/bin:$PATH
# Run setup.py
RUN python setup.py install
# Make port 80 available to the world outside this container
EXPOSE 80
# Define environment variable
ENV NAME onnx-stan
# Run the application when the container launches
CMD ["python", "your_main_script.py"]