File size: 704 Bytes
708f5d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Use an official Python runtime as the base image
FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-runtime

# It is necessary to install git to run the pip install -r requirements.txt
RUN apt-get update && apt-get install -y git

RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

# Set the working directory in the container
WORKDIR $HOME/app

# Copy the current directory contents into the container at /app
COPY --chown=user . $HOME/app

RUN pip install -r requirements.txt

# FROM base AS test
# CMD ["python", "-m", "pdb", "test_cli_search_engine.py"]
# FROM base AS run
# COPY . .
# CMD ["python", "app.py"]

COPY . .

EXPOSE 5000

CMD ["python", "server.py"]