Skip to content
Snippets Groups Projects
Commit c0f01e01 authored by Eduard Staniloiu's avatar Eduard Staniloiu
Browse files

Use conda in docker

parent f941957b
No related tags found
No related merge requests found
FROM ubuntu:20.04
LABEL maintainer="eduard.staniloiu@upb.ro" \
name="ASC Grid Docker Image" \
version=${VERSION}
ENV DEBIAN_FRONTEND="noninteractive"
ENV TZ=Europe/Bucharest
WORKDIR /app
RUN apt-get update
RUN apt-get install -y wget
RUN apt-get install -y python3
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh
RUN chmod +x ~/miniconda.sh && ~/miniconda.sh -b -p $HOME/miniconda
COPY ./conda-env.yml /app/
COPY ./entrypoint.sh /entrypoint.sh
RUN ["chmod", "+x", "/entrypoint.sh"]
RUN /entrypoint.sh conda init bash
RUN /entrypoint.sh conda env create -f /app/conda-env.yml
#RUN ~/miniconda/bin/conda create -f /app/conda-env.yml
ENTRYPOINT ["/entrypoint.sh"]
version=1.0.1
registry=gitlab.cs.pub.ro:5050/asc/asc-public
img_name=conda-labs
tag_name=${registry}/${img_name}:${version}
#tag_name=test-asc:${img_name}-${version}
build:
docker image build -t ${tag_name} --build-arg VERSION=${version} .
test:
docker run --rm -it --name ${img_name} ${tag_name} /bin/bash
run: build
docker run -it --name ${img_name} -e QT_DEBUG_PLUGINS=1 ${tag_name} /bin/bash
bash:
docker exec -it ${img_name} /bin/bash
push:
docker push ${tag_name}
clean:
docker rm -f ${img_name}
docker image rm ${tag_name}
name: conda-test
channels:
- pytorch
- conda-forge
- anaconda
- defaults
dependencies:
- python=3.8
- pip
- pip:
- scipy
- numpy
#!/bin/bash
set -e
export PATH=~/miniconda/bin:$PATH
exec "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment