adding Dockerfile
Browse files- Dockerfile +27 -0
- environment.yml +1 -0
Dockerfile
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM --platform=linux/amd64 python:3.10
|
2 |
+
|
3 |
+
WORKDIR /code
|
4 |
+
|
5 |
+
# Install base utilities
|
6 |
+
RUN apt-get update \
|
7 |
+
&& apt-get install -y build-essential \
|
8 |
+
&& apt-get install -y wget \
|
9 |
+
&& apt-get clean \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Install miniconda
|
13 |
+
ENV CONDA_DIR /opt/conda
|
14 |
+
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
|
15 |
+
/bin/bash ~/miniconda.sh -b -p /opt/conda
|
16 |
+
|
17 |
+
# Put conda in path so we can use conda activate
|
18 |
+
ENV PATH=$CONDA_DIR/bin:$PATH
|
19 |
+
|
20 |
+
COPY ./environment.yml /code/environment.yml
|
21 |
+
# RUN echo $CONDA_PREFIX
|
22 |
+
RUN conda env create -f /code/environment.yml
|
23 |
+
#--file /code/requirements.txt
|
24 |
+
|
25 |
+
COPY . .
|
26 |
+
|
27 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
environment.yml
CHANGED
@@ -6,6 +6,7 @@ channels:
|
|
6 |
- nvidia/label/cuda-11.8.0
|
7 |
- pytorch
|
8 |
dependencies:
|
|
|
9 |
- _libgcc_mutex=0.1=conda_forge
|
10 |
- _openmp_mutex=4.5=2_kmp_llvm
|
11 |
- asttokens=2.4.1=pyhd8ed1ab_0
|
|
|
6 |
- nvidia/label/cuda-11.8.0
|
7 |
- pytorch
|
8 |
dependencies:
|
9 |
+
- cudatoolkit-dev
|
10 |
- _libgcc_mutex=0.1=conda_forge
|
11 |
- _openmp_mutex=4.5=2_kmp_llvm
|
12 |
- asttokens=2.4.1=pyhd8ed1ab_0
|