-
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
1 parent
0775403
commit 4364ac9
Showing
44 changed files
with
6,359 additions
and
2,150 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,85 @@ | ||
##################################################################### | ||
# CONDA & MINICONDA WITH PYBASE DOCKERFILE # | ||
# For zeroshot models # | ||
# dvats-jupyter:cuda12.2.0-ubuntu20.04-hooks-mplots-zeroshot # | ||
##################################################################### | ||
############## | ||
# Base image # | ||
############## | ||
##--- Setup Ubuntu | ||
FROM misantamaria/dvats-jupyter:cuda12.2.0-ubuntu20.04-hooks-mplots | ||
|
||
##--- Setup bash | ||
SHELL [ "/bin/bash", "--login", "-c" ] | ||
|
||
COPY docker/environment.zeroshot.yml /tmp/environment.zeroshot.yml | ||
|
||
RUN mamba env update --name env --file /tmp/environment.zeroshot.yml \ | ||
&& mamba clean --all --yes | ||
|
||
############# | ||
# Zero-shot # | ||
############# | ||
# POETRY | ||
RUN curl -sSL https://install.python-poetry.org | ${ENV_PREFIX}/bin/python3.10 - | ||
ENV POETRY_PATH="${HOME}/.local/bin/poetry" | ||
RUN ${POETRY_PATH} --version | ||
|
||
# MOMENT | ||
ENV PIP $CONDA_DIR/envs/env/bin/pip | ||
RUN $PIP install git+https://github.com/moment-timeseries-foundation-model/moment.git | ||
#RUN $PIP install git+https://github.com/moment-timeseries-foundation-model/moment.git@040df9a5091eb83201d8764acb96350a5c84f47e | ||
# Commit usado: 040df9a5091eb83201d8764acb96350a5c84f47e | ||
#RUN $PIP install git+https://github.com/misantamaria/moment.git@v1.0.0 | ||
ENV LIB_PATH /usr/local/share/lib | ||
ENV PKGS $ENV_PREFIX/lib/python3.10/site-packages/ | ||
RUN mkdir $LIB_PATH | ||
#RUN conda init bash \ | ||
# && /bin/bash -c "source $CONDA_DIR/etc/profile.d/conda.sh" \ | ||
# && cd $LIB_PATH\ | ||
# && rm -rf moment \ | ||
# && git clone https://github.com/misantamaria/moment.git \ | ||
# && cd moment \ | ||
# && git checkout v1.0.0 \ | ||
# && $PIP install -e '.[notebook]' --no-warn-script-location --no-deps --target=$PKGS | ||
|
||
# MOIRAI | ||
RUN conda init bash \ | ||
&& /bin/bash -c "source $CONDA_DIR/etc/profile.d/conda.sh" \ | ||
&& cd $LIB_PATH \ | ||
&& rm -rf uni2ts \ | ||
&& git clone https://github.com/misantamaria/uni2ts.git \ | ||
&& cd uni2ts \ | ||
&& git checkout 1.1.2 \ | ||
&& $PIP install -e '.[notebook]' --no-warn-script-location --no-deps --target=$PKGS | ||
|
||
#TEMPO | ||
RUN conda init bash \ | ||
&& /bin/bash -c "source $CONDA_DIR/etc/profile.d/conda.sh" \ | ||
&& cd $LIB_PATH \ | ||
&& rm -rf TEMPO TEMPO_project \ | ||
&& git clone https://github.com/DC-research/TEMPO.git \ | ||
#&& git clone https://github.com/misantamaria/TEMPO.git \ | ||
&& cd TEMPO \ | ||
#&& git checkout v1.0.0 \ | ||
&& git checkout 755bcc765a0b6e9921063f5abded34dd900b2f14 \ | ||
&& mv requirements.txt _requirements.txt \ | ||
&& grep -v -- '--extra-index-url' _requirements.txt > requirements.txt \ | ||
&& mv requirements.txt __requirements.txt \ | ||
&& grep -v -- '#' __requirements.txt > requirements.txt \ | ||
&& ${POETRY_PATH} init --name TEMPO --description "TEMPO" --author "Author Name <email@example.com>" --license "MIT" --no-interaction \ | ||
&& cat requirements.txt | xargs -I {} ${POETRY_PATH} add {} --no-interaction \ | ||
# Lock versions | ||
&& ${POETRY_PATH} lock --no-interaction \ | ||
# Install dependencies | ||
&& ${POETRY_PATH} install --no-interaction \ | ||
# Ensure modules | ||
&& cd .. \ | ||
&& find ./TEMPO -type d -exec touch {}/__init__.py \; \ | ||
&& ${POETRY_PATH} new --name TEMPO --src TEMPO_project \ | ||
&& cd TEMPO_project \ | ||
&& $PIP install -e . --no-deps --target=$PKGS | ||
|
||
RUN mkdir -p ${LIB_PATH}/TEMPO/TEMPO_checkpoints \ | ||
&& chmod -R 777 /usr/local/share/lib/TEMPO/ | ||
# ---- Zero shot ---- # |
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,130 @@ | ||
############################# | ||
# JUPYTER VOLUME DOCKERFILE # | ||
#***************************# | ||
# Set up a jupyter-lab for # | ||
# developing using deepvats # | ||
############################# | ||
############## | ||
# Base image # | ||
############## | ||
##--- Setup Ubuntu | ||
FROM misantamaria/dvats-jupyter:cuda12.2.0-ubuntu20.04-hooks-mplots-zeroshot | ||
|
||
#--- Tags | ||
LABEL maintainer="vrodriguezf <victor.rfernandez@upm.es>" | ||
LABEL cuda_version=${CUDA_VERSION} | ||
|
||
##---Initialize bash | ||
SHELL [ "/bin/bash", "--login", "-c" ] | ||
|
||
#-- Environmental variables for wandb | ||
ENV LC_ALL=C.UTF-8 \ | ||
LANG=C.UTF-8 | ||
|
||
|
||
#-- Octave GUI - uing interactive octave plots | ||
RUN apt-get update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
xvfb \ | ||
x11-xserver-utils \ | ||
gnuplot \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
|
||
######################## | ||
# Create non-root user # | ||
######################## | ||
ARG username=user\ | ||
uid=1000 \ | ||
gid=1000 | ||
ENV USER=$username \ | ||
UID=$uid \ | ||
GID=$gid | ||
ENV HOME=/home/$USER | ||
|
||
#-- Passwordless sudo (TODO: mv to root section) | ||
RUN addgroup --gid $GID $USER \ | ||
&& adduser --disabled-password \ | ||
--gecos "Non-root user" \ | ||
--uid $UID \ | ||
--gid $GID \ | ||
--home $HOME $USER\ | ||
&& echo "$USER ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | ||
|
||
#RUN sudo chown -R $UID:$GID /usr/local/share/miniconda3/envs/env | ||
|
||
#-- Move to user | ||
USER $USER | ||
|
||
# Add the jupyterlab settings | ||
COPY --chown=$uid:$gid docker/jupyter_config $HOME/.jupyter | ||
|
||
############################# | ||
# Ensure miniconda for user # | ||
############################# | ||
|
||
#ENV MINICONDA_VERSION=4.10.3 \ | ||
# CONDA_DIR=/opt/miniconda3 | ||
|
||
#ENV PATH=$CONDA_DIR/bin:$PATH \ | ||
ENV PROJECT_DIR=${HOME} | ||
#ENV ENV_PREFIX=/opt/env | ||
|
||
RUN echo "--> Activate conda" | ||
|
||
# Make conda activate command available from /bin/bash --interative shells | ||
RUN conda init bash \ | ||
# Create a project directory inside user home | ||
&& mkdir -p $PROJECT_DIR | ||
|
||
RUN echo "--> WORKDIR" | ||
WORKDIR ${HOME} | ||
|
||
COPY --chown=$UID:$GID docker/entrypoint.sh /usr/local/bin | ||
|
||
# Make bash automatically activate the conda environment | ||
RUN echo "conda activate $ENV_PREFIX" >> ~/.bashrc \ | ||
&& echo "--> Exec entrypoint" \ | ||
&& chmod u+x /usr/local/bin/entrypoint.sh | ||
|
||
ENV PATH /usr/local/share/miniconda3/envs/env/bin:$PATH | ||
|
||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] | ||
|
||
ARG JUPYTER_TOKEN | ||
ENV JUPYTER_TOKEN=${JUPYTER_TOKEN} | ||
# default command will be to launch JupyterLab server for development | ||
|
||
COPY --chown=$UID:$GID ./ $HOME/work | ||
|
||
RUN source /usr/local/share/miniconda3/bin/activate env \ | ||
&& cd $HOME/work \ | ||
&& ls -la $HOME/work \ | ||
&& git --version | ||
|
||
SHELL [ "/bin/sh", "-c" ] | ||
RUN cd ${HOME}/work/ \ | ||
&& git config --global --add safe.directory /home/macu/work \ | ||
&& git rev-parse --is-inside-work-tree || (echo "Not inside a Git repository"; exit 1) \ | ||
&& pre-commit install | ||
|
||
COPY docker/pre-commit .git/hooks/pre-commit | ||
|
||
RUN conda list octave | ||
|
||
#CMD ["sh", "-c", "jupyter lab --no-browser --ip 0.0.0.0 --ContentsManager.allow_hidden=True --NotebookApp.token=$JUPYTER_TOKEN"] | ||
|
||
RUN pip install aeon | ||
|
||
ARG JUPYTER_TOKEN | ||
ENV JUPYTER_TOKEN=${JUPYTER_TOKEN} | ||
|
||
CMD [\ | ||
"sh", "-c", \ | ||
"xvfb-run -a jupyter lab \ | ||
--no-browser \ | ||
--ip 0.0.0.0 \ | ||
--ContentsManager.allow_hidden=True \ | ||
--NotebookApp.token=$JUPYTER_TOKEN"\ | ||
] | ||
|
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,22 @@ | ||
name: env | ||
channels: | ||
- conda-forge | ||
- anaconda | ||
- huggingface | ||
dependencies: | ||
#-- Mplots | ||
- gluonts=0.14.4 | ||
- tqdm=4.66.2 | ||
- huggingface_hub=0.24.0 | ||
- transformers=4.33.3 | ||
- einops=0.7.* | ||
- lightning>=2.0 | ||
- jaxtyping>=0.2.24 | ||
- python-dotenv=1.0.0 | ||
- hydra-core=1.3 | ||
- orjson | ||
- tensorboard | ||
- multiprocess | ||
- safetensors | ||
- datasets~=2.17.1 | ||
- jax[cpu] |
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
Oops, something went wrong.