File size: 821 Bytes
c4968c3
 
142ffac
c4968c3
 
 
 
 
684ee1d
 
c4968c3
 
 
 
 
95dd151
c4968c3
edc39bb
 
 
c4968c3
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# Use an official Python runtime as a parent image
FROM python:3.11

# Set the working directory in the container
WORKDIR /app/ttyd

# Copy the current directory contents into the container at /usr/src/app
# COPY . /app/ttyd
COPY *.py /app/ttyd

# to make gradio app accessible to local network (default 127.0.0.1 is only accissible within the container)
ENV GRADIO_SERVER_NAME=0.0.0.0

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt # already installed in base image

#to be moved to ttyd_base image
RUN python -c "from sentence_transformers import SentenceTransformer; model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2', cache_folder='./tmp/hfEmbModel')"

# Use ENTRYPOINT to allow passing user arguments
ENTRYPOINT ["python", "app.py"]