-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdockerfile
More file actions
34 lines (24 loc) · 982 Bytes
/
dockerfile
File metadata and controls
34 lines (24 loc) · 982 Bytes
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
# Use an appropriate base image
FROM continuumio/miniconda3
# Add conda to PATH
ENV PATH=/opt/conda/bin:$PATH
# Create application directory
RUN mkdir /app
# Set the working directory
WORKDIR /app
# Copy environment.yml to the container
COPY environment3.yml /app/environment.yml
# Create the conda environment
RUN conda env create -f /app/environment.yml
# Ensure conda is initialized
RUN /opt/conda/bin/conda init bash
# Copy the rest of your application code to the container
COPY . /app
SHELL ["bash", "-c"]
RUN echo "source /opt/conda/etc/profile.d/conda.sh && conda activate ldsc" >> ~/.bashrc
# Expose port 5000
EXPOSE 5000
# Command to run your application with the environment activated
CMD ["bash", "-c", "source /opt/conda/etc/profile.d/conda.sh && conda activate ldsc && python /app/app.py"]
# Command to run your application with the environment activated
#CMD ["bash", "-c", "source /opt/conda/etc/profile.d/conda.sh && conda activate ldscTest && exec bash"]