Spaces:
Runtime error
Runtime error
# Use an official Python runtime as a parent image | |
FROM python:3.11.1 | |
# Set up user | |
RUN useradd -m -u 1000 user | |
USER user | |
# Install Cargo (Rust's package manager), needed for hf_transfer | |
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | |
# Set up environment variables | |
ENV HOME=/home/user \ | |
PATH=/home/user/.local/bin:$PATH \ | |
PATH=/home/user/.cargo/bin:$PATH | |
# Set the working directory in the container | |
# WORKDIR /usr/src/app | |
WORKDIR $HOME/app | |
# Copy the current directory contents into the container at /usr/src/app | |
# COPY . /usr/src/app | |
COPY --chown=user . $HOME/app | |
# Set user to root | |
# USER root | |
# Install any needed packages specified in requirements.txt | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Make port 80 available to the world outside this container | |
EXPOSE 80 | |
# Define environment variable | |
# ENV NAME World | |
# Run train_llm.py when the container launches | |
CMD ["python", "./train_llm.py"] | |