$ls -q Dockerfile docker-compose.yml notebooks
Created
September 21, 2022 19:38
-
-
Save diegoquintanav/d86e00eda7c0fdd5d098b7366bbc0656 to your computer and use it in GitHub Desktop.
docker-compose for lambdalabs machine
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
version: "3.4" | |
services: | |
miniconda: | |
image: "hfbook-miniconda3:latest" | |
build: | |
context: . | |
dockerfile: Dockerfile | |
volumes: | |
- ./notebooks:/src/notebooks | |
# https://gist.github.com/charlesfrye/e27adfc47129a4c209f6dfcb14467fba | |
deploy: | |
resources: | |
reservations: | |
devices: | |
- driver: nvidia | |
device_ids: [ '0', '1' ] | |
capabilities: [ gpu ] |
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
from continuumio/miniconda3:latest | |
RUN mkdir -p /src/notebooks | |
WORKDIR /src/notebooks | |
COPY notebooks/environment.yml notebooks/requirements.txt /src/notebooks/ | |
RUN conda env create -f environment.yml | |
# from https://github.com/nlp-with-transformers/notebooks | |
COPY notebooks /src/notebooks | |
# https://pythonspeed.com/articles/activate-conda-dockerfile/ | |
RUN ["conda" ,"run", "--no-capture-output", "-n", "book", "python", "-c", "import sys;print('hello from docker');print(sys.version_info)"] | |
# https://stackoverflow.com/a/42873832/5819113 | |
ENTRYPOINT ["tail", "-f", "/dev/null"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment