Spaces:
Paused
Paused
FROM huggingface/transformers-pytorch-gpu as base | |
RUN pip install fastapi uvicorn pydantic pydantic-settings langdetect accelerate optimum pytest pytest-cov | |
RUN useradd -m -u 1000 user | |
WORKDIR /code | |
COPY --chown=user . /code | |
COPY logging.conf /code | |
ARG APP_ENV | |
ENV APP_ENV=${APP_ENV} | |
# Conditional commands based on APP_ENV | |
RUN if [ "$APP_ENV" = "dev" ]; then \ | |
echo "Force dev dependencies"; \ | |
pip install pytest pytest-cov; \ | |
fi | |
RUN mkdir -p /home/.cache/huggingface | |
RUN mkdir -p /.cache | |
RUN chmod -R 777 /home/.cache/huggingface | |
RUN chmod -R 777 /.cache | |
RUN mkdir -p /code/room_environment-classifier_onxx | |
RUN chmod -R 777 /code/room_environment-classifier_onxx | |
# Remove when settings getted from consul | |
# COPY .env /code | |
CMD ["uvicorn", "mappingservice.main:app","--host", "0.0.0.0", "--port", "80"] |