FaceRecognition / Dockerfile
kerols77's picture
Fix permission error for cache directory in Dockerfile
24cc383
raw
history blame contribute delete
375 Bytes
FROM python:3.9-slim
WORKDIR /app
# Create the cache directory and give full write permissions
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
# Set TORCH_HOME to the cache directory
ENV TORCH_HOME=/app/cache
COPY requirements.txt .
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 7860
CMD ["python", "app.py"]