Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GettingStartedWithModernCpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
GILLES Sebastien
GettingStartedWithModernCpp
Commits
96d74156
Commit
96d74156
authored
4 years ago
by
Vicente Mataix Ferrándiz
Committed by
GILLES Sebastien
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Adding full image
parent
d2b7c556
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+16
-0
16 additions, 0 deletions
.gitlab-ci.yml
docker/Dockerfile
+1
-1
1 addition, 1 deletion
docker/Dockerfile
docker/Dockerfile_full
+55
-0
55 additions, 0 deletions
docker/Dockerfile_full
with
72 additions
and
1 deletion
.gitlab-ci.yml
+
16
−
0
View file @
96d74156
...
@@ -6,6 +6,8 @@ stages:
...
@@ -6,6 +6,8 @@ stages:
build_docker
:
build_docker
:
stage
:
build
stage
:
build
retry
:
2
retry
:
2
tags
:
-
linux
only
:
only
:
refs
:
refs
:
-
master
-
master
...
@@ -14,3 +16,17 @@ build_docker:
...
@@ -14,3 +16,17 @@ build_docker:
-
docker build -f docker/Dockerfile -t $CI_REGISTRY/$CI_PROJECT_PATH:latest .
-
docker build -f docker/Dockerfile -t $CI_REGISTRY/$CI_PROJECT_PATH:latest .
-
docker container prune
-
docker container prune
-
docker push $CI_REGISTRY/$CI_PROJECT_PATH:latest
-
docker push $CI_REGISTRY/$CI_PROJECT_PATH:latest
build_docker_full
:
stage
:
build
retry
:
2
tags
:
-
linux
only
:
refs
:
-
master
script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build -f docker/Dockerfile_full -t $CI_REGISTRY/$CI_PROJECT_PATH:full .
-
docker container prune
-
docker push $CI_REGISTRY/$CI_PROJECT_PATH:full
This diff is collapsed.
Click to expand it.
docker/Dockerfile
+
1
−
1
View file @
96d74156
...
@@ -19,4 +19,4 @@ SHELL ["/bin/bash", "-c"]
...
@@ -19,4 +19,4 @@ SHELL ["/bin/bash", "-c"]
# The code to run when container is started:
# The code to run when container is started:
# Using informations from https://hub.docker.com/r/continuumio/miniconda3 and options used by Vicente in former Docker file based on Ubuntu.
# Using informations from https://hub.docker.com/r/continuumio/miniconda3 and options used by Vicente in former Docker file based on Ubuntu.
ENTRYPOINT
[ "conda", "run", "--no-capture-output", "-n", "training_cpp_2021", "jupyter", "lab", "--port=8888", "--ip=0.0.0.0", "--no-browser","--allow-root","--NotebookApp.token=''"]
ENTRYPOINT
[ "conda", "run", "--no-capture-output", "-n", "training_cpp_2021", "jupyter", "lab", "--port=8888", "--ip=0.0.0.0", "--no-browser","--allow-root","--NotebookApp.token=''"]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docker/Dockerfile_full
0 → 100644
+
55
−
0
View file @
96d74156
# Each instruction in this file generates a new layer that gets pushed to your local image cache
# Lines preceeded by # are regarded as comments and ignored
# The line below states we will base our new image on the Latest Official Ubuntu
FROM ubuntu:latest
# Identify the maintainer of an image
LABEL maintainer="vicente.mataix-ferrandiz@inria.fr"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y clean
RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get install -y \
nano \
bash \
wget \
curl \
git \
cmake \
build-essential && \
apt-get autoremove -y
RUN apt-get -y clean
# Creation of a "non-root" user
ENV USER "formation"
RUN useradd --create-home ${USER}
USER ${USER}
# Default working directory is
WORKDIR /home/${USER}
RUN curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
RUN bash Miniconda3-latest-Linux-x86_64.sh -b
RUN rm -rf Miniconda3-latest-Linux-x86_64.sh
# Changing to home
WORKDIR /home/${USER}
RUN git clone https://gitlab.inria.fr/formations/cpp/gettingstartedwithmoderncpp.git
# Change the default shell to be bash
SHELL ["/bin/bash", "-c"]
# Conda environment
WORKDIR /home/${USER}/gettingstartedwithmoderncpp
RUN /home/${USER}/miniconda3/bin/conda env create -f environment.yml
RUN /home/${USER}/miniconda3/bin/conda init bash
RUN source /home/${USER}/miniconda3/etc/profile.d/conda.sh
RUN /home/${USER}/miniconda3/bin/conda clean -a
# Add to the bashrc
RUN echo "alias python=\"python3\"" >> ~/.bashrc
RUN echo "conda activate training_cpp_2021" >> ~/.bashrc
RUN source ~/.bashrc
CMD ["/home/formation/miniconda3/bin/conda", "run", "--no-capture-output", "-n", "training_cpp_2021", "jupyter", "lab", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root","--NotebookApp.token=''"]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment