File size: 917 Bytes
57aa8d4
 
1cc3de0
 
 
c1f9e93
6b917fe
5feba59
1cc3de0
 
 
 
 
76451fb
1cc3de0
 
 
 
30343f7
6936b3e
1cc3de0
919910a
 
1cc3de0
 
 
772bcea
5feba59
772bcea
971cc91
772bcea
 
1cc3de0
919910a
 
1cc3de0
772bcea
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
32
33
34
35
36
37
FROM python:3.10

# Set environment variables
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
ENV HF_HOME=/app/.cache/huggingface/hub
RUN mkdir -p /app/.cache/huggingface/hub
RUN mkdir .haystack
# Install system dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    python3-venv \
    && rm -rf /var/lib/apt/lists/*
EXPOSE 3000
# Set up virtual environment
RUN python3 -m venv $VIRTUAL_ENV

# Set working directory
WORKDIR /app

# Copy requirements file
COPY ./req.txt /app/req.txt

# Activate virtual environment and install project dependencies
RUN /bin/bash -c "source $VIRTUAL_ENV/bin/activate && pip install --upgrade pip && pip install --no-cache-dir -r req.txt"

# Create directory within the /app directory

RUN chmod -R 777 /app



# Copy application code
COPY . /app

# Run the application within the virtual environment
CMD ["/opt/venv/bin/python", "app.py"]