Last active
April 24, 2022 20:01
-
-
Save tezansahu/c63897d11483e022a4388e4a0c00bc8c to your computer and use it in GitHub Desktop.
Dockerfile for Janus AI API server
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
# Specify the Base image | |
FROM python:3.8-slim | |
# Update and install the basic OS-related packages | |
RUN apt-get update -y && \ | |
apt-get dist-upgrade -y && \ | |
apt-get install -y && \ | |
apt-get install build-essential -y \ | |
supervisor wget unzip | |
# Specify the working directory to be used for all further build instructions | |
WORKDIR /user/src/janus-ai/ | |
# Copy the relevant files from the host machine to the Docker image | |
COPY paraphrasingModule.py /user/src/janus-ai/paraphrasingModule.py | |
COPY main.py /user/src/janus-ai/main.py | |
COPY requirements.txt /user/src/janus-ai/requirements.txt | |
# Install the python packages required by the server | |
RUN pip install -r requirements.txt | |
# Choose what port(s) should be available to communicate with a container | |
# Since the server will run on port 8000, this port is exposed | |
EXPOSE 8000 | |
# Execute the following command as Docker launches the Docker container from the image | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment