-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM registry.cern.ch/docker.io/mambaorg/micromamba | ||
EXPOSE 8000 | ||
|
||
# Create empty directory for the various volume to be mounted | ||
# and assign them to mambauser | ||
# This is needed for the DIRAC integration test, as docker-compose | ||
# isn't playing well with permissions and volumes | ||
USER root | ||
RUN mkdir /cs_store /signing-key && chown $MAMBA_USER:$MAMBA_USER /cs_store /signing-key | ||
USER $MAMBA_USER | ||
|
||
WORKDIR /code | ||
|
||
COPY --chown=$MAMBA_USER:$MAMBA_USER . /code/diracx | ||
|
||
RUN micromamba install --yes --file diracx/environment.yml --name=base && micromamba clean --all --yes --force-pkgs-dirs | ||
|
||
ARG MAMBA_DOCKERFILE_ACTIVATE=1 | ||
|
||
RUN pip install ./diracx git+https://github.com/DIRACGrid/DIRAC.git@integration | ||
# Copying in ENTRYPOINT script | ||
COPY --chown=$MAMBA_USER:$MAMBA_USER entrypoint.sh / | ||
RUN chmod 755 /entrypoint.sh | ||
|
||
# In many clusters the container is ran as a random uid for security reasons. | ||
# If we mark the conda directory as group 0 and give it group write permissions | ||
# then we're still able to manage the environment from inside the container. | ||
USER 0 | ||
RUN chown -R $MAMBA_USER:0 /opt/conda && chmod -R g=u /opt/conda | ||
USER $MAMBA_USER | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# TODO: This is a workaround until this is released | ||
# https://github.com/DaanDeMeyer/reproc/pull/103 | ||
# or that this is merged | ||
# https://github.com/conda-forge/reproc-feedstock/pull/10 | ||
ulimit -n 8192 | ||
|
||
eval "$(micromamba shell hook --shell=posix)" | ||
micromamba activate base | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: diracx-dev | ||
channels: | ||
- diracgrid | ||
- conda-forge | ||
- nodefaults | ||
dependencies: | ||
- authlib | ||
- aiohttp | ||
- aiomysql | ||
- aiosqlite | ||
- azure-core | ||
- cachetools | ||
######## | ||
# Building the docker image on some system may fail | ||
# as long as this bug is still present | ||
# https://github.com/DaanDeMeyer/reproc/pull/103 | ||
# or that this is merged | ||
# https://github.com/conda-forge/reproc-feedstock/pull/10 | ||
# If it does, we need to comment out `dirac-grid` here | ||
# and install it via pip | ||
- dirac-grid | ||
- m2crypto >=0.38.0 | ||
- python-gfal2 | ||
- importlib_resources | ||
####### | ||
- email-validator | ||
- fastapi | ||
- git | ||
- gitpython | ||
- httpx | ||
- isodate | ||
- mypy | ||
- opensearch-py | ||
- pydantic =1.10.10 | ||
- pyjwt | ||
- pytest | ||
- pytest-asyncio | ||
- pytest-cov | ||
- pytest-httpx | ||
- python | ||
- python-dotenv | ||
- python-jose | ||
- python-multipart | ||
- pyyaml | ||
- requests | ||
- rich | ||
- sqlalchemy | ||
- typer | ||
- types-cachetools | ||
- types-PyYAML | ||
- types-requests | ||
- uvicorn | ||
- moto | ||
- aiobotocore | ||
- botocore | ||
- git | ||
- pip: | ||
- types-aiobotocore[essential] | ||
- boto3-stubs[essential] |