Dockerfile 1.63 KB
Newer Older
Mingbo Wan's avatar
Mingbo Wan committed
1
2
3
# this Dockerfile is for torchaudio smoke test, it will be created periodically via CI system
# if you need to do it locally, follow below steps once you have Docker installed
# assuming you're within the directory where this Dockerfile located
4
5
# to test the build use : docker build . -t torchaudio/smoketest
# to upload the Dockerfile use build_and_push.sh script
Mingbo Wan's avatar
Mingbo Wan committed
6
7
8
9
10
11
12

FROM ubuntu:latest

RUN apt-get -qq update && apt-get -qq -y install curl bzip2 sox libsox-dev libsox-fmt-all \
    && curl -sSL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh \
    && bash /tmp/miniconda.sh -bfp /usr/local \
    && rm -rf /tmp/miniconda.sh \
13
    && conda install -c conda-forge gcc \
Mingbo Wan's avatar
Mingbo Wan committed
14
15
16
17
18
19
20
21
22
23
    && conda install -y python=3 \
    && conda update conda \
    && apt-get -qq -y remove curl bzip2 \
    && apt-get -qq -y autoremove \
    && apt-get autoclean \
    && rm -rf /var/lib/apt/lists/* /var/log/dpkg.log \
    && conda clean --all --yes

ENV PATH /opt/conda/bin:$PATH

24

moto's avatar
moto committed
25
RUN conda create -y --name python3.8 python=3.8
moto's avatar
moto committed
26
RUN conda create -y --name python3.9 python=3.9
27
28
RUN conda create -y --name python3.10 python=3.10

Mingbo Wan's avatar
Mingbo Wan committed
29
SHELL [ "/bin/bash", "-c" ]
30
RUN echo "source /usr/local/etc/profile.d/conda.sh" >> ~/.bashrc
moto's avatar
moto committed
31
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.8 && conda install -y -c conda-forge sox && conda install -y numpy
moto's avatar
moto committed
32
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.9 && conda install -y -c conda-forge sox && conda install -y numpy
33
RUN source /usr/local/etc/profile.d/conda.sh && conda activate python3.10 && conda install -y -c conda-forge sox && conda install -y numpy
Mingbo Wan's avatar
Mingbo Wan committed
34
CMD [ "/bin/bash"]