Spaces:
Runtime error
Runtime error
FROM python:3.9 | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV PATH="/home/user/.local/bin:$PATH" | |
WORKDIR /app | |
COPY --chown=user ./requirements.txt requirements.txt | |
RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
COPY --chown=user . /app | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |
# FROM python:3.9 | |
# # Set environment variables | |
ENV MODEL_NAME="meta-llama/Meta-Llama-3-8B-Instruct" | |
ENV TRANSFORMERS_CACHE="/app/transformers_cache" | |
ENV LC_ALL=C.UTF-8 | |
ENV LANG=C.UTF-8 | |
# # Install additional dependencies if needed | |
RUN pip install --no-cache-dir fastapi uvicorn | |
# # Create the app directory and set permissions | |
RUN mkdir /app && chmod -R 777 /app | |
# # Set the working directory | |
WORKDIR /app | |
# # Copy your model and code to the container | |
COPY ./app.py /app | |
COPY ./Dockerfile /app | |
COPY ./requirements.txt /app | |
# # Expose the port FastAPI will run on | |
EXPOSE 8000 | |
# # Run FastAPI server | |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] | |