generated from microsoft/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (22 loc) · 1003 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
# Use the official Miniconda3 image as a parent image
FROM continuumio/miniconda3
# Set the working directory in the container
WORKDIR /app
# Install build-essential package for gcc and other build tools - required for the Rust project
RUN apt-get update && apt-get install -y build-essential
# Copy the environment.yml file into the container at /app
COPY environment.yml /app/environment.yml
# Create the environment and activate it
RUN conda env create -f environment.yml
# Make RUN commands use the new environment
SHELL ["conda", "run", "-n", "sr2silo", "/bin/bash", "-c"]
# Copy the current directory contents into the container at /app
COPY . /app
# Build the Rust project as a Python extension
RUN cd silo_input_transformer && maturin develop --release
# Install the sr2silo package
RUN pip install -e .
# Define environment variable
ENV NAME sr2silo
# Run vp_transformer.py when the container launches
CMD ["bash", "-c", "source activate sr2silo && python scripts/vp_transformer.py"]