File size: 1,263 Bytes
bfd0858
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
40
41
42
43
44
45
46
47
48
49
50
51
# Use the official Ubuntu 20.04 image as the base
FROM ubuntu:20.04

# Set environment variables
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8

# Install system dependencies
RUN apt-get update && apt-get install -y \
    wget \
    bzip2 \
    ca-certificates \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

# Install Miniconda
ENV CONDA_DIR=/opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
    /bin/bash /tmp/miniconda.sh -b -p $CONDA_DIR && \
    rm /tmp/miniconda.sh

# Add Miniconda to the PATH
ENV PATH=$CONDA_DIR/bin:$PATH

# Install Mamba
# RUN conda install -y -c conda-forge mamba && \
#     mamba --version

# Create a Conda environment using Mamba
COPY environment.yml /tmp/environment.yml
RUN conda env create -n caNanoWikiAI -f /tmp/environment.yml && \
    rm /tmp/environment.yml

# Activate the Conda environment by default
ENV PATH=$CONDA_DIR/envs/caNanoWikiAI/bin:$PATH

# Set the working directory in the container
WORKDIR /app

# Copy your application files
COPY . /app

# Expose the container port
EXPOSE 5000

# Set environment variables (optional)
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0

# Define the command to run your application
CMD [ "python", "app.py" ]