-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
38 lines (30 loc) · 1004 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
33
34
35
36
37
38
FROM ubuntu:22.04
# TODO: everything in docker
# update
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
cmake \
libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libfontconfig1 libxext6\
wget
# download anaconda3
RUN wget https://repo.anaconda.com/archive/Anaconda3-2023.07-1-Linux-x86_64.sh -O ~/anaconda.sh \
&& /bin/bash ~/anaconda.sh -b -p /opt/conda \
&& rm ~/anaconda.sh
# setup env
ENV PATH=/opt/conda/bin:$PATH
RUN /opt/conda/bin/conda init bash
CMD ["/bin/bash", "-c", "source ~/.bashrc && exec bash"]
# init workspace
WORKDIR /metaurban
# copy all codes
COPY . .
# install requirements
RUN conda create -n metaurban python=3.9
# activate metaurban
RUN /bin/bash -c "source activate metaurban"
# activate metaurban with starting point
RUN echo "source activate metaurban" >> ~/.bashrc
# install dep lib
RUN /opt/conda/envs/metaurban/bin/pip install -e .
RUN /opt/conda/envs/metaurban/bin/pip install scikit-image stable_baselines3 pyyaml