Spaces:
Runtime error
Runtime error
File size: 828 Bytes
57aa8d4 1cc3de0 3526597 1cc3de0 30343f7 6936b3e 1cc3de0 919910a 1cc3de0 772bcea 971cc91 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 |
FROM python:3.10
# Set environment variables
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3-venv \
&& rm -rf /var/lib/apt/lists/*
# 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 mkdir -p .haystack
RUN chmod -R 777 /app
# Copy application code
COPY . /app
# Run the application within the virtual environment
CMD ["/opt/venv/bin/python", "app.py"] |