FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ews-coordinator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gilligan Lab for Epidemiology and Modelling
Wheat rusts
ews-coordinator
Commits
6bd03841
Commit
6bd03841
authored
1 year ago
by
L. Bower
Browse files
Options
Downloads
Patches
Plain Diff
changing dockerfile to allow the ewsmanager user to install packages using pip
parent
472d7f04
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configs/docker/build/Dockerfile
+21
-28
21 additions, 28 deletions
configs/docker/build/Dockerfile
with
21 additions
and
28 deletions
configs/docker/build/Dockerfile
+
21
−
28
View file @
6bd03841
...
...
@@ -3,10 +3,30 @@ FROM ubuntu:24.04 as base_image
SHELL
["/bin/bash", "-c"]
#install system packages
RUN
apt-get update
;
apt-get
install
--assume-yes
python-dev-is-python3 python3-dev python3.11-venv wget unzip emacs gdal-bin libgdal-dev build-essential gfortran zlib1g zlib1g-dev libbz2-dev apt-utils liblzma-dev libcurl4-openssl-dev default-jre openssh-server libfribidi-dev libfontconfig1-dev libspatialindex-dev git
;
#sets the timezone to London
RUN
DEBIAN_FRONTEND
=
noninteractive
TZ
=
Etc/UTC apt-get
-y
install
tzdata
#these usernames and ids match the production server (IaaS), override when building a local image if needed
ARG
GNAME=ews
ARG
UNAME=ewsmanager
ARG
UID=1006
ARG
GID=1008
RUN
groupadd
-g
$GID
$GNAME
RUN
useradd
-m
-u
$UID
-g
$GID
-o
-s
/bin/bash
$UNAME
#run mkdir as root
RUN
mkdir
-p
/storage/app/EWS_prod/regions/EastAfrica/workspace
RUN
mkdir
-p
/storage/app/EWS_prod/regions/SouthAsia/workspace
RUN
chown
-R
$UNAME
/storage
#swith to the user before installing stuff
USER
$UNAME
#create dirs
WORKDIR
/home
#RUN mkdir /home/ewsmanager/code
...
...
@@ -15,40 +35,13 @@ WORKDIR /home
#COPY ./conda-env-py3EWS-nobuilds.yml .
COPY
./requirements.txt .
#install system packages
RUN
apt-get update
;
apt-get
install
--assume-yes
python-dev-is-python3 python3-dev python3.11-venv wget unzip emacs gdal-bin libgdal-dev build-essential gfortran zlib1g zlib1g-dev libbz2-dev apt-utils liblzma-dev libcurl4-openssl-dev default-jre openssh-server libfribidi-dev libfontconfig1-dev libspatialindex-dev git
;
RUN
echo
"alias e='emacs -nw
$1
'"
>>
~/.bashrc
;
RUN
alias
ll
=
"ls -ltr"
#sets the timezone to London
RUN
DEBIAN_FRONTEND
=
noninteractive
TZ
=
Etc/UTC apt-get
-y
install
tzdata
# Install miniconda
#ENV CONDA_DIR /storage/app/miniconda3
#RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh \
# && /bin/bash ~/miniconda.sh -b -p $CONDA_DIR \
# && rm -v ~/miniconda.sh;
# Put conda in path so we can use conda activate
#ENV PATH=$CONDA_DIR/bin:$PATH
#build the conda env(s)
#RUN conda env create --file conda-env-py3EWS-nobuilds.yml --prefix /storage/app/EWS_prod/envs/conda/py3EWS
#build the venv
RUN
python3
-m
venv /storage/app/EWS_prod/envs/venv/ews_prod
RUN
source
/storage/app/EWS_prod/envs/venv/ews_prod/bin/activate
;
pip
install
-r
requirements.txt
#tidy
#RUN rm -v conda-env-py3EWS-nobuilds.yml;
#RUN rm -v requirements.txt;
#these usernames and ids match the production server (IaaS), override when building a local image if needed
ARG
GNAME=ews
ARG
UNAME=ewsmanager
ARG
UID=1006
ARG
GID=1008
RUN
groupadd
-g
$GID
$GNAME
RUN
useradd
-m
-u
$UID
-g
$GID
-o
-s
/bin/bash
$UNAME
USER
$UNAME
RUN
echo
$PYTHONPATH
WORKDIR
/home/ewsmanager
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