Spaces:
Build error
Build error
FROM slabstech/dhwani-server-base | |
WORKDIR /app | |
RUN mkdir -p /app/models | |
# Define build argument for HF_TOKEN | |
ARG HF_TOKEN_DOCKER | |
# Set environment variable for the build process | |
ENV HF_TOKEN=$HF_TOKEN_DOCKER | |
# Copy and run the model download script | |
COPY download_models.py . | |
RUN python download_models.py | |
COPY dhwani_config.json . | |
COPY . . | |
# Set up user | |
RUN useradd -ms /bin/bash appuser \ | |
&& chown -R appuser:appuser /app | |
USER appuser | |
# Expose port | |
EXPOSE 7860 | |
# Start the server | |
CMD ["python", "/app/src/server/main.py", "--host", "0.0.0.0", "--port", "7860", "--config", "config_two"] |