Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
repos
research
Knowledge Gaps
Commits
7252d2a0
Commit
7252d2a0
authored
May 18, 2022
by
fab
Browse files
cursed experiments-
parent
7e792f4e
Pipeline
#4163
passed with stages
in 4 minutes and 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
7252d2a0
...
...
@@ -10,6 +10,10 @@ RUN apt install -y curl gcc g++ gpg git make ca-certificates conda
RUN
apt
install
-y
libkrb5-dev libsasl2-dev
SHELL
["/bin/bash", "-c"]
RUN
source
/opt/conda/etc/profile.d/conda.sh
&&
\
conda activate
&&
\
# conda activate &&
\
conda update
-y
conda
&&
\
conda create
-n
p37
python
=
3.7
&&
\
conda activate p37
&&
\
pip
install
--upgrade
pip
&&
\
pip
install
tox
==
3.24.4
&&
\
pip
install
git+https://gitlab.wikimedia.org/repos/data-engineering/workflow_utils.git@
${
wmf_workflow_utils
}
Makefile
View file @
7252d2a0
...
...
@@ -22,7 +22,8 @@ GIT_COMMIT_HASH := $(shell git rev-parse --short=8 HEAD)
DOCKER_IMG
:=
research/miniconda3
DOCKERFILE
:=
Dockerfile
# Generate x86_64 binaries when running docker on non x86 platform (e.g. apple m1).
DOCKER_PLATFORM
:=
linux/amd64
DOCKER_PLATFORM
:=
linux/arm64
# DOCKER_PLATFORM := linux/amd64
PROJECT_NAME
:=
knowledge-gaps
# Do not modify PROJECT_VERSION manually. Use bump2version instead.
PROJECT_VERSION
:=
0.1.1
...
...
@@ -30,17 +31,20 @@ CONDA_DIST := ./dist/${PROJECT_NAME}-${PROJECT_VERSION}.conda-${GIT_BRANCH}-${GI
# Build an x86_64-linux docker image.
docker-conda
:
docker buildx build
--platform
${DOCKER_PLATFORM}
-t
${DOCKER_IMG}
-f
${DOCKERFILE}
.
docker build
-t
${DOCKER_IMG}
-f
${DOCKERFILE}
.
# docker buildx build --platform ${DOCKER_PLATFORM} -t ${DOCKER_IMG} -f ${DOCKERFILE} .
ifneq
($(SKIP_DOCKER),true)
CURRENT_DIR
:=
$(
shell
pwd
)
DOCKER_CMD
:=
docker run
-it
\
--rm
\
--platform
${DOCKER_PLATFORM}
\
-v
${CURRENT_DIR}
:/root
\
-e
SKIP_DOCKER
=
true
\
-w
/root
${DOCKER_IMG}
# --platform ${DOCKER_PLATFORM} \
# The research/miniconda3 image is required to run
# CI targets in a docker container.
env
:
docker-conda
...
...
@@ -49,12 +53,17 @@ lint: docker-conda
typecheck
:
docker-conda
endif
bashing
:
${DOCKER_CMD}
basht
# Create a conda dist archive, containing this project and all
# its dependencies.
env
:
${DOCKER_CMD}
bash
-c
"source /opt/conda/etc/profile.d/conda.sh &&
\
conda activate &&
\
conda activate
p37
&&
\
conda-dist --dist-env-prefix=
${CONDA_DIST}
"
# conda activate && \
# Run the pytest suite.
test
:
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment