Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
Neuroestimator
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Show more breadcrumbs
RC Data Science
community-containers
Neuroestimator
Commits
e9dbd950
Commit
e9dbd950
authored
3 months ago
by
Fortune Iriaye
Browse files
Options
Downloads
Patches
Plain Diff
Update Dockerfile to implement multi-stage build
parent
7594d2fd
No related branches found
No related tags found
No related merge requests found
Pipeline
#13330
passed with stage
in 23 minutes and 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docker/Dockerfile
+19
-14
19 additions, 14 deletions
docker/Dockerfile
with
19 additions
and
14 deletions
docker/Dockerfile
+
19
−
14
View file @
e9dbd950
FROM
ubuntu:22.04
FROM
tensorflow/tensorflow:1.15.0
AS
tensorflow
# Set noninteractive mode to prevent prompts during installation
ENV
DEBIAN_FRONTEND=noninteractive
...
...
@@ -10,7 +10,7 @@ RUN apt-get update && apt-get install -y \
curl
\
git
\
build-essential
\
libcurl4-openssl-dev
\
libcurl4-openssl-dev
||
apt-get
install
-y
libcurl4-gnutls-dev
\
libssl-dev
\
libxml2-dev
\
libxt-dev
\
...
...
@@ -22,13 +22,6 @@ RUN apt-get update && apt-get install -y \
psmisc
\
&&
rm
-rf
/var/lib/apt/lists/
*
# Create an RStudio user with sudo access
RUN
useradd
-m
-s
/bin/bash rstudio
&&
echo
"rstudio:rstudio"
| chpasswd
&&
\
usermod
-aG
sudo
rstudio
# Set working directory
WORKDIR
/root
# Install Miniconda
RUN
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
-O
miniconda.sh
&&
\
bash miniconda.sh
-b
-p
/opt/miniconda
&&
\
...
...
@@ -42,7 +35,6 @@ RUN echo "channels:\n - conda-forge\n - bioconda\n - defaults\n - r" > /root
# Create Conda environment and install dependencies
RUN
conda create
--name
neuroestimator
-y
\
r-essentials
\
tensorflow
=
1.15.0
\
tensorflow-estimator
=
1.15.1
\
r-keras
=
2.3.0.0
\
...
...
@@ -54,10 +46,23 @@ RUN conda create --name neuroestimator -y \
r-remotes
\
'r-reticulate<=1.24'
# Install RStudio Server
RUN
wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2024.12.1-563-amd64.deb
-O
rstudio-server.deb
&&
\
dpkg
-i
rstudio-server.deb
||
apt-get
-f
install
-y
&&
\
rm
rstudio-server.deb
# Rstudio setup
FROM
rocker/rstudio:4.3.3
AS
rstudio
# Set environment variables
ENV
DEBIAN_FRONTEND=noninteractive
ENV
PATH="/opt/miniconda/bin:$PATH"
# Copy Tensorflow and Miniconda environment
COPY
--from=tensorflow /opt/miniconda /opt/miniconda
COPY
--from=tensorflow /root/.condarc /root/.condarc
# Create an Rstudio User
RUN
id
-u
rstudio
>
/dev/null 2>&1
||
useradd
-m
-s
/bin/bash rstudio
&&
\
echo
"rstudio:rstudio"
| chpasswd
&&
\
usermod
-aG
sudo
rstudio
# Ensure RStudio uses Conda's R
RUN
echo
'export RSTUDIO_WHICH_R="/opt/miniconda/envs/neuroestimator/bin/R"'
>>
/etc/profile.d/rstudio.sh
...
...
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