This repository contains examples for using conda to build Docker images.
Specifically, the examples are targed towards best practice usage when using Anaconda's repositories.
The example provided is a simple "Hello World" application using FastAPI.
The following files define the application and its dependencies:
app.py: The application codeenvironment.yml: The conda environment dependency specification
The example requires a local installation of conda with the anaconda-auth package installed:
conda install --name base anaconda-authThe commands to build the images are stored in Makefile.
By default all of the images in the ./examples directory.
To build the images:
make buildYou ran also build and run the services locally using docker-compose (if that is installed):
make upYou can then access the services by visiting e.g. http://localhost:8000 in your web browser.
You can also check with a tool like curl:
❯ curl http://localhost:8000
{"hello":"world"}%