-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.txt
More file actions
76 lines (59 loc) · 2.96 KB
/
Dockerfile.txt
File metadata and controls
76 lines (59 loc) · 2.96 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# 기본 이미지로 특정 NVIDIA CUDA 이미지 사용
FROM nvidia/cuda:11.6.1-cudnn8-devel-ubuntu20.04
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8
ENV PATH /opt/conda/bin:$PATH
WORKDIR /project
# Install Dependencies of Anaconda
RUN apt-get update --fix-missing && \
apt-get install -y wget bzip2 curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install Anaconda3
RUN wget --quiet https://repo.anaconda.com/archive/Anaconda3-2023.03-Linux-x86_64.sh -O ~/anaconda.sh && \
/bin/bash ~/anaconda.sh -b -p /opt/conda && \
rm ~/anaconda.sh && \
/opt/conda/bin/conda clean -y -all && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate dsgan_env" >> ~/.bashrc
# Create dsgan_env environment
RUN /opt/conda/bin/conda create -y --name dsgan_env python=3.9
# Install PyTorch and dependencies
RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && conda activate dsgan_env && \
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.6 -c pytorch -c nvidia && \
conda clean -y --all"
# Install additional dependencies
RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && conda activate dsgan_env && \
conda install -y libfaiss=1.7.1 -c conda-forge && \
conda clean -y --all"
RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && conda activate dsgan_env && \
conda install -y _libgcc_mutex=0.1 ca-certificates=2022.2.1 certifi=2021.10.8 && \
conda clean -y --all"
RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && conda activate dsgan_env && \
conda install -y matplotlib-base=3.3.4 && \
conda clean -y --all"
RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && conda activate dsgan_env && \
conda install -y python-lmdb=1.2.1 && \
conda clean -y --all"
RUN /bin/bash -c "source /opt/conda/etc/profile.d/conda.sh && conda activate dsgan_env && \
conda install -y setuptools pip pillow && \
conda clean -y --all"
# Activate gan environment by default
CMD ["/bin/bash", "-c", "source /opt/conda/etc/profile.d/conda.sh && conda activate dsgan_env && /bin/bash"]
# # Miniconda 설치를 위한 필요 패키지 설치
# RUN apt-get update && apt-get install -y wget && \
# apt-get install curl -y && \
# rm -rf /var/lib/apt/lists/*
# # Miniconda 설치
# RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
# bash /tmp/miniconda.sh -b -p /opt/conda && \
# rm /tmp/miniconda.sh
# # Conda 환경을 자동으로 활성화하고, bash 쉘을 시작
# ENTRYPOINT ["conda", "run", "-n", "dsgan_env", "/bin/bash"]
# "${SHELL}" <(curl -L micro.mamba.pm/install.sh)
# micromamba update --all
# micromamba install -c conda-forge m2-conda-epoch
conda install -y m2-libedit -c conda-forge
conda install -y libfaiss-avx2 -c conda-forge
# conda install -y libffi
# conda install -y faiss=1.7.1 -c conda-forge