-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (21 loc) · 836 Bytes
/
Dockerfile
File metadata and controls
31 lines (21 loc) · 836 Bytes
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
31
# Use an official Python runtime as a parent image
FROM python:3.12-slim-bookworm
SHELL [ "/bin/bash", "-c" ]
ENV SHELL=/bin/bash
# Set the working directory in the container to /app
WORKDIR /app
# Copy the current directory contents into the container at /app
ENV NVM_DIR=/root/.nvm
RUN apt-get update
RUN apt-get install -y curl
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt install -y nodejs
ENV NODE_PATH=$NVM_DIR/v20/lib/node_modules
ENV PATH=$NVM_DIR/v20/bin:$PATH
ADD . /app
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
#EXPOSE the port, for now default is 8080 cause it's the only one really allowed by HuggingFace
EXPOSE 8000
# Run run.py when the container launches
CMD ["bash", "-c" ,"uvicorn src.main:app --host 0.0.0.0"]