forked from hummingbot/backend-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev
30 lines (21 loc) · 876 Bytes
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM continuumio/miniconda3:latest
RUN apt-get update && \
apt-get install -y sudo libusb-1.0 python3-dev gcc g++ && \
rm -rf /var/lib/apt/lists/*
WORKDIR /backend-api
# Copy and create conda environment
COPY environment.yml .
RUN conda env create -f environment.yml
# Install development dependencies
COPY requirements-dev.txt .
RUN conda run -n backend-api pip install -r requirements-dev.txt
# Copy the rest of the application
COPY . .
# Create necessary directories
RUN mkdir -p /backend-api/bots/credentials
# Make sure we use the conda environment
SHELL ["conda", "run", "-n", "backend-api", "/bin/bash", "-c"]
# Set environment path
ENV PATH /opt/conda/envs/backend-api/bin:$PATH
# Activate conda environment and run uvicorn with hot reload
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload", "--reload-dir", "/backend-api"]