forked from NexaAI/nexa-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
24 lines (18 loc) · 830 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use a base image that includes Miniconda
FROM continuumio/miniconda3
# Set the working directory in the container
WORKDIR /app
RUN apt-get update && apt-get install -y cmake g++
# Copy the environment.yml file into the container at /app
COPY pyproject.toml CMakeLists.txt requirements.txt README.md ./
COPY dependency ./dependency
# Install the conda environment
RUN conda create -n nexa python=3.10 -y
RUN /bin/bash -c "source activate nexa && pip install -r requirements.txt && pip install -e ."
# Activate the environment
RUN echo "source activate nexa" > ~/.bashrc
ENV PATH /opt/conda/envs/nexa/bin:$PATH
# Copy your application code to the container
COPY . .
# Set the command to activate the environment and start your application
CMD ["bash", "-c", "source activate nexa && python -m nexa.cli.entry gen-text gemma"]